@@ -167,21 +167,15 @@ func serializeTransactions(chainId *big.Int, transactions []interface{}, blockTi
167
167
168
168
func serializeTransaction (chainId * big.Int , tx map [string ]interface {}, blockTimestamp time.Time , receipt * common.RawReceipt ) common.Transaction {
169
169
return common.Transaction {
170
- ChainId : chainId ,
171
- Hash : interfaceToString (tx ["hash" ]),
172
- Nonce : hexToUint64 (tx ["nonce" ]),
173
- BlockHash : interfaceToString (tx ["blockHash" ]),
174
- BlockNumber : hexToBigInt (tx ["blockNumber" ]),
175
- BlockTimestamp : blockTimestamp ,
176
- TransactionIndex : hexToUint64 (tx ["transactionIndex" ]),
177
- FromAddress : interfaceToString (tx ["from" ]),
178
- ToAddress : func () string {
179
- to := interfaceToString (tx ["to" ])
180
- if to != "" {
181
- return to
182
- }
183
- return "0x0000000000000000000000000000000000000000"
184
- }(),
170
+ ChainId : chainId ,
171
+ Hash : interfaceToString (tx ["hash" ]),
172
+ Nonce : hexToUint64 (tx ["nonce" ]),
173
+ BlockHash : interfaceToString (tx ["blockHash" ]),
174
+ BlockNumber : hexToBigInt (tx ["blockNumber" ]),
175
+ BlockTimestamp : blockTimestamp ,
176
+ TransactionIndex : hexToUint64 (tx ["transactionIndex" ]),
177
+ FromAddress : interfaceToString (tx ["from" ]),
178
+ ToAddress : interfaceToString (tx ["to" ]),
185
179
Value : hexToBigInt (tx ["value" ]),
186
180
Gas : hexToUint64 (tx ["gas" ]),
187
181
GasPrice : hexToBigInt (tx ["gasPrice" ]),
0 commit comments