wallet.sendTransaction(tx) defaults to wrong chainID #2484
-
My attempt to send a transaction:
The above code results in this error:
You can see that it says the chainID is 56, so it's trying to send from the wrong chain which makes it think it doesn't have enough to send. Changing the tx to the following results in a successful transaction:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That My guess would be the gasLimit is the important thing missing; is the recipient a contract? The implicit call to estimate the gas may be returning a value such that the intrinsic cost exceeds the funds the wallet has. What do you get as a result is estimateGas for that tx? |
Beta Was this translation helpful? Give feedback.
That
id
is the JSON-RPC request ID, which is completely unrelated to the chain ID.My guess would be the gasLimit is the important thing missing; is the recipient a contract? The implicit call to estimate the gas may be returning a value such that the intrinsic cost exceeds the funds the wallet has. What do you get as a result is estimateGas for that tx?