@@ -597,6 +597,7 @@ fn should_decode_address() {
597597fn should_decode_transaction_receipt ( ) {
598598 let value = evm_rpc_types:: TransactionReceipt {
599599 status : Some ( 0x1_u8 . into ( ) ) ,
600+ root : None ,
600601 transaction_hash : "0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f"
601602 . parse ( )
602603 . unwrap ( ) ,
@@ -617,6 +618,7 @@ fn should_decode_transaction_receipt() {
617618 . unwrap ( ) ) ,
618619 transaction_index : 0xd9_u16 . into ( ) ,
619620 tx_type : "0x2" . parse ( ) . unwrap ( ) ,
621+ cumulative_gas_used : 0xf02aed_u64 . into ( ) ,
620622 } ;
621623 assert_eq ! (
622624 Decode !( & Encode !( & value) . unwrap( ) , evm_rpc_types:: TransactionReceipt ) . unwrap( ) ,
@@ -1038,6 +1040,7 @@ fn eth_get_transaction_receipt_should_succeed() {
10381040 raw_body : json ! ( { "jsonrpc" : "2.0" , "id" : 0 , "result" : { "blockHash" : "0x5115c07eb1f20a9d6410db0916ed3df626cfdab161d3904f45c8c8b65c90d0be" , "blockNumber" : "0x11a85ab" , "contractAddress" : null, "cumulativeGasUsed" : "0xf02aed" , "effectiveGasPrice" : "0x63c00ee76" , "from" : "0x0aa8ebb6ad5a8e499e550ae2c461197624c6e667" , "gasUsed" : "0x7d89" , "logs" : [ ] , "logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" , "status" : "0x1" , "to" : "0x356cfd6e6d0000400000003900b415f80669009e" , "transactionHash" : "0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f" , "transactionIndex" : "0xd9" , "type" : "0x2" } } ) ,
10391041 expected : evm_rpc_types:: TransactionReceipt {
10401042 status : Some ( 0x1_u8 . into ( ) ) ,
1043+ root : None ,
10411044 transaction_hash : "0xdd5d4b18923d7aae953c7996d791118102e889bea37b48a651157a4890e4746f" . parse ( ) . unwrap ( ) ,
10421045 contract_address : None ,
10431046 block_number : 0x11a85ab_u64 . into ( ) ,
@@ -1050,13 +1053,15 @@ fn eth_get_transaction_receipt_should_succeed() {
10501053 to : Some ( "0x356cfd6e6d0000400000003900b415f80669009e" . parse ( ) . unwrap ( ) ) ,
10511054 transaction_index : 0xd9_u16 . into ( ) ,
10521055 tx_type : "0x2" . parse ( ) . unwrap ( ) ,
1056+ cumulative_gas_used : 0xf02aed_u64 . into ( ) ,
10531057 } ,
10541058 } ,
10551059 TestCase { //first transaction after genesis
10561060 request : "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060" ,
1057- raw_body : json ! ( { "jsonrpc" : "2.0" , "id" : 0 , "result" : { "transactionHash" : "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060" , "blockHash" : "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd" , "blockNumber" : "0xb443" , "logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" , "gasUsed" : "0x5208" , "root" : "0x96a8e009d2b88b1483e6941e6812e32263b05683fac202abc622a3e31aed1957" , "contractAddress" : null, "cumulativeGasUsed" : "0x5208" , "transactionIndex" : "0x0" , "from" : "0xa1e4380a3b1f749673e270229993ee55f35663b4" , "to" : "0x5df9b87991262f6ba471f09758cde1c0fc1de734" , "type" : "0x0" , "effectiveGasPrice" : "0x2d79883d2000" , "logs" : [ ] } } ) ,
1061+ raw_body : json ! ( { "jsonrpc" : "2.0" , "id" : 0 , "result" : { "transactionHash" : "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060" , "blockHash" : "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd" , "blockNumber" : "0xb443" , "logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" , "gasUsed" : "0x5208" , "root" : "0x96a8e009d2b88b1483e6941e6812e32263b05683fac202abc622a3e31aed1957" , "contractAddress" : null, "cumulativeGasUsed" : "0x5208" , "transactionIndex" : "0x0" , "from" : "0xa1e4380a3b1f749673e270229993ee55f35663b4" , "to" : "0x5df9b87991262f6ba471f09758cde1c0fc1de734" , "type" : "0x0" , "effectiveGasPrice" : "0x2d79883d2000" , "logs" : [ ] , "root" : "0x96a8e009d2b88b1483e6941e6812e32263b05683fac202abc622a3e31aed1957" } } ) ,
10581062 expected : evm_rpc_types:: TransactionReceipt {
10591063 status : None ,
1064+ root : Some ( "0x96a8e009d2b88b1483e6941e6812e32263b05683fac202abc622a3e31aed1957" . parse ( ) . unwrap ( ) ) ,
10601065 transaction_hash : "0x5c504ed432cb51138bcf09aa5e8a410dd4a1e204ef84bfed1be16dfba1b22060" . parse ( ) . unwrap ( ) ,
10611066 contract_address : None ,
10621067 block_number : 0xb443_u64 . into ( ) ,
@@ -1069,13 +1074,15 @@ fn eth_get_transaction_receipt_should_succeed() {
10691074 to : Some ( "0x5df9b87991262f6ba471f09758cde1c0fc1de734" . parse ( ) . unwrap ( ) ) ,
10701075 transaction_index : 0x0_u16 . into ( ) ,
10711076 tx_type : "0x0" . parse ( ) . unwrap ( ) ,
1077+ cumulative_gas_used : 0x5208_u64 . into ( ) ,
10721078 } ,
10731079 } ,
10741080 TestCase { //contract creation
10751081 request : "0x2b8e12d42a187ace19c64b47fae0955def8859bf966c345102c6d3a52f28308b" ,
10761082 raw_body : json ! ( { "jsonrpc" : "2.0" , "id" : 0 , "result" : { "transactionHash" : "0x2b8e12d42a187ace19c64b47fae0955def8859bf966c345102c6d3a52f28308b" , "blockHash" : "0xd050426a753a7cc4833ba15a5dfcef761fd983f5277230ea8dc700eadd307363" , "blockNumber" : "0x12e64fd" , "logsBloom" : "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" , "gasUsed" : "0x69892" , "contractAddress" : "0x6abda0438307733fc299e9c229fd3cc074bd8cc0" , "cumulativeGasUsed" : "0x3009d2" , "transactionIndex" : "0x17" , "from" : "0xe12e9a6661aeaf57abf95fd060bebb223fbee7dd" , "to" : null, "type" : "0x2" , "effectiveGasPrice" : "0x17c01a135" , "logs" : [ ] , "status" : "0x1" } } ) ,
10771083 expected : evm_rpc_types:: TransactionReceipt {
10781084 status : Some ( 0x1_u8 . into ( ) ) ,
1085+ root : None ,
10791086 transaction_hash : "0x2b8e12d42a187ace19c64b47fae0955def8859bf966c345102c6d3a52f28308b" . parse ( ) . unwrap ( ) ,
10801087 contract_address : Some ( "0x6abda0438307733fc299e9c229fd3cc074bd8cc0" . parse ( ) . unwrap ( ) ) ,
10811088 block_number : 0x12e64fd_u64 . into ( ) ,
@@ -1088,6 +1095,7 @@ fn eth_get_transaction_receipt_should_succeed() {
10881095 to : None ,
10891096 transaction_index : 0x17_u16 . into ( ) ,
10901097 tx_type : "0x2" . parse ( ) . unwrap ( ) ,
1098+ cumulative_gas_used : 0x3009d2_u64 . into ( ) ,
10911099 } ,
10921100 }
10931101 ] ;
0 commit comments