MarshalJSON encodes the web3 RPC transaction format.
()
| 271 | |
| 272 | // MarshalJSON encodes the web3 RPC transaction format. |
| 273 | func (tx *TransactionOld) MarshalJSON() ([]byte, error) { |
| 274 | hash := tx.Hash() |
| 275 | data := tx.data |
| 276 | data.Hash = &hash |
| 277 | return data.MarshalJSON() |
| 278 | } |
| 279 | |
| 280 | // UnmarshalJSON decodes the web3 RPC transaction format. |
| 281 | func (tx *TransactionOld) UnmarshalJSON(input []byte) error { |