diff --git a/src/eth/transaction.rs b/src/eth/transaction.rs index 2e5f34cd9af..4b3f2f3dc20 100644 --- a/src/eth/transaction.rs +++ b/src/eth/transaction.rs @@ -915,7 +915,7 @@ pub(crate) mod tests { fn test_parse_eip1559_tx() { // Raw transaction hex for the EIP-1559 transaction let raw_tx = hex::decode( - "02f8740181f1843b9aca00851535cf027f82520894e0e5d2b4edcc473b988b44b4d13c3972cb6694cb8801ea8d467f558e1e80c001a07eb3335f4fd4de25ec3452c08882f28fb098b2eaa37a332941f918d869f5c2ada059b9d4aa997c7fa34f1b167f98a12432bb1a4a35660d723a9c19bb76b4cd025d" + "02f86282013a8080808094ff000000000000000000000000000000000003ec8080c080a0f411a73e33523b40c1a916e79e67746bd01a4a4fb4ecfa87b441375a215ddfb4a0551692c1553574fab4c227ca70cb1c121dc3a2ef82179a9c984bd7acc0880a38" ).expect("Invalid hex"); let result = parse_eip1559_tx(&raw_tx); @@ -923,40 +923,37 @@ pub(crate) mod tests { if let EthTx::Eip1559(tx) = result.unwrap() { // Assert chain ID - assert_eq!(tx.chain_id, 1); + assert_eq!(tx.chain_id, 314); // Assert nonce - assert_eq!(tx.nonce, 241); + assert_eq!(tx.nonce, 0); // Assert max fee per gas - assert_eq!(tx.max_fee_per_gas, BigInt::from(91097072255u64)); + assert_eq!(tx.max_fee_per_gas, BigInt::from(0u64)); // Assert max priority fee per gas - assert_eq!(tx.max_priority_fee_per_gas, BigInt::from(1000000000u64)); + assert_eq!(tx.max_priority_fee_per_gas, BigInt::from(0u64)); // Assert gas limit - assert_eq!(tx.gas_limit, 21000); + assert_eq!(tx.gas_limit, 0); // Assert recipient address assert_eq!( tx.to.unwrap(), - EthAddress::from_str("0xe0e5d2b4edcc473b988b44b4d13c3972cb6694cb").unwrap() + EthAddress::from_str("0xff000000000000000000000000000000000003ec").unwrap() ); // Assert value - assert_eq!(tx.value, BigInt::from(138078072511761950u64)); - - // Assert input data (not explicitly given in your values, assuming it's empty for now) - assert!(tx.input.is_empty()); + assert_eq!(tx.value, BigInt::from(0)); // Assert v, r, s - assert_eq!(tx.v, BigInt::from(1u8)); + assert_eq!(tx.v, BigInt::from(00u8)); assert_eq!( tx.r, BigInt::from_bytes_be( Sign::Plus, &hex::decode( - "7eb3335f4fd4de25ec3452c08882f28fb098b2eaa37a332941f918d869f5c2ad" + "f411a73e33523b40c1a916e79e67746bd01a4a4fb4ecfa87b441375a215ddfb4" ) .unwrap() ) @@ -966,7 +963,7 @@ pub(crate) mod tests { BigInt::from_bytes_be( Sign::Plus, &hex::decode( - "59b9d4aa997c7fa34f1b167f98a12432bb1a4a35660d723a9c19bb76b4cd025d" + "551692c1553574fab4c227ca70cb1c121dc3a2ef82179a9c984bd7acc0880a38" ) .unwrap() ) diff --git a/src/tool/subcommands/api_cmd.rs b/src/tool/subcommands/api_cmd.rs index 2b26004c64b..6146e29993d 100644 --- a/src/tool/subcommands/api_cmd.rs +++ b/src/tool/subcommands/api_cmd.rs @@ -1511,7 +1511,7 @@ fn eth_tests_with_tipset(store: &Arc, shared_tipset: &Tipset ), RpcTest::identity(EthGetTransactionHashByCid::request((block_cid,)).unwrap()), RpcTest::identity( - EthSendRawTransaction::request((EthBytes(hex::decode("02f8740181f1843b9aca00851535cf027f82520894e0e5d2b4edcc473b988b44b4d13c3972cb6694cb8801ea8d467f558e1e80c001a07eb3335f4fd4de25ec3452c08882f28fb098b2eaa37a332941f918d869f5c2ada059b9d4aa997c7fa34f1b167f98a12432bb1a4a35660d723a9c19bb76b4cd025d").unwrap()),)) + EthSendRawTransaction::request((EthBytes(hex::decode("02f86282013a8080808094ff000000000000000000000000000000000003ec8080c080a0f411a73e33523b40c1a916e79e67746bd01a4a4fb4ecfa87b441375a215ddfb4a0551692c1553574fab4c227ca70cb1c121dc3a2ef82179a9c984bd7acc0880a38").unwrap()),)) .unwrap(), ), ];