-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Labels
t:bugSomething isn't workingSomething isn't working
Description
Description
The filed chainId is required for latest transactions:
- For
TransactionLegacyUnsigned,chainIdis optional. - For
Transaction2930Unsigned,chainIdis required. - For
Transaction1559Unsigned,chainIdis required.
For JSON-RPC method eth_estimateGas:
-
Ethereum will accept this field. (ref: Ethereum JSON-RPC Specification)
-
But Axon won't.
When a request contains
chainId, Axon will throw an error.axon/core/api/src/jsonrpc/web3_types.rs
Lines 303 to 322 in f692b86
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] #[serde(deny_unknown_fields, rename_all = "camelCase")] pub struct Web3CallRequest { #[serde(rename = "type", skip_serializing_if = "Option::is_none")] pub transaction_type: Option<U64>, pub from: Option<H160>, pub to: Option<H160>, #[serde(skip_serializing_if = "Option::is_none")] pub gas_price: Option<U256>, #[serde(skip_serializing_if = "Option::is_none")] pub max_fee_per_gas: Option<U256>, pub gas: Option<U256>, pub value: Option<U256>, pub data: Option<Hex>, pub nonce: Option<U256>, #[serde(skip_serializing_if = "Option::is_none")] pub access_list: Option<AccessList>, #[serde(skip_serializing_if = "Option::is_none")] pub max_priority_fee_per_gas: Option<U256>, }
In Further
-
Other fields in JSON-RPC methods required to be checked, too.
-
In fact, hardhat (ethers.js) always sends this field when call
eth_estimateGas.Why does it found until now?
Because, all tests call this method manually.For examples: THIS.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
t:bugSomething isn't workingSomething isn't working