{{define "txdetail"}}{{$cs := .CoinShortcut}}{{$addr := .AddrStr}}{{$tx := .Tx}}{{$data := .}}
{{$tx.Txid}}
{{if eq $tx.EthereumSpecific.Status 1}}
✔{{end}}{{if eq $tx.EthereumSpecific.Status 0}}
✘{{end}}
{{- if $tx.Blocktime}}
{{if $tx.Confirmations}}mined{{else}}first seen{{end}} {{formatUnixTime $tx.Blocktime}}
{{end -}}
{{if $tx.EthereumSpecific.Error}}
Error: {{$tx.EthereumSpecific.Error}}
{{end}}
{{- range $vin := $tx.Vin -}}
|
{{- range $a := $vin.Addresses -}}
{{if and (ne $a $addr) $vin.IsAddress}}{{$a}}{{else}}{{$a}}{{end}}
{{- else -}}
Unparsed address
{{- end -}}
|
{{- else -}}
| No Inputs |
{{- end -}}
{{- range $vout := $tx.Vout -}}
|
{{- range $a := $vout.Addresses -}}
{{- if and (ne $a $addr) $vout.IsAddress}}{{$a}}{{else}}{{$a}}{{- end -}}
{{- else -}}
Unparsed address
{{- end -}}
|
{{- else -}}
| No Outputs |
{{- end -}}
{{formatAmount $tx.ValueOutSat}} {{$cs}}
{{if eq $tx.EthereumSpecific.Type 1}}
Contract creation
{{end}}
{{if $tx.EthereumSpecific.InternalTransfers}}
Internal Transactions
{{- range $tt := $tx.EthereumSpecific.InternalTransfers -}}
{{if eq $tt.Type 1}}Contract creation{{end}}
{{if eq $tt.Type 2}}Contract destruction{{end}}
|
{{if ne $tt.From $addr}}{{$tt.From}}{{else}}{{$tt.From}}{{end}}
|
|
{{if ne $tt.To $addr}}{{$tt.To}}{{else}}{{$tt.To}}{{end}}
|
{{formatAmount $tt.Value}} {{$cs}}
{{- end -}}
{{- end -}}
{{- if tokenTransfersCount $tx "ERC20" -}}
ERC20 Token Transfers
{{- range $tt := $tx.TokenTransfers -}}
{{if eq $tt.Type "ERC20"}}
|
{{if ne $tt.From $addr}}{{$tt.From}}{{else}}{{$tt.From}}{{end}}
|
|
{{if ne $tt.To $addr}}{{$tt.To}}{{else}}{{$tt.To}}{{end}}
|
{{formatAmountWithDecimals $tt.Value $tt.Decimals}} {{$tt.Symbol}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if tokenTransfersCount $tx "ERC721" -}}
ERC721 Token Transfers
{{- range $tt := $tx.TokenTransfers -}}
{{if eq $tt.Type "ERC721"}}
|
{{if ne $tt.From $addr}}{{$tt.From}}{{else}}{{$tt.From}}{{end}}
|
|
{{if ne $tt.To $addr}}{{$tt.To}}{{else}}{{$tt.To}}{{end}}
|
ID {{formatAmountWithDecimals $tt.Value 0}} {{$tt.Symbol}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if tokenTransfersCount $tx "ERC1155" -}}
ERC1155 Token Transfers
{{- range $tt := $tx.TokenTransfers -}}
{{if eq $tt.Type "ERC1155"}}
|
{{if ne $tt.From $addr}}{{$tt.From}}{{else}}{{$tt.From}}{{end}}
|
|
{{if ne $tt.To $addr}}{{$tt.To}}{{else}}{{$tt.To}}{{end}}
|
{{- range $iv := $tt.Values -}}
{{formatAmountWithDecimals $iv.Id 0}}:{{formatAmountWithDecimals $iv.Value $tt.Decimals}} {{$tt.Symbol}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if $tx.FeesSat -}}
Fee: {{formatAmount $tx.FeesSat}} {{$cs}}
{{- end -}}
{{- if $tx.Confirmations -}}
{{$tx.Confirmations}} Confirmations
{{- else -}}
Unconfirmed Transaction!
{{- end -}}
{{formatAmount $tx.ValueOutSat}} {{$cs}}
{{end}}