Is there a difference between web3.py sign transaction vs ethers.js sign transaction ? #3070
-
ethers.js signTransaction() function definition is given below: ethers.js/packages/wallet/lib/index.js Lines 154 to 166 in a71f518 eth-account sign_transaction() function definition is give below: In Is this a bug or am I missing something ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
It is perfectly valid to have a I also recommend reading the TypeScript source code, rather than the generated code; it’s much more pleasant to look at. :) Does that make sense? |
Beta Was this translation helpful? Give feedback.
-
@ricmoo I noticed the following differences in allowed keys in a transaction while browsing through the source code. In ether.js following are the allowed fields, ethers.js/packages/transactions/src.ts/index.ts Lines 105 to 107 in a71f518 In eth-account (web3.py), the following are the allowed fields, ALLOWED_TRANSACTION_KEYS = {
'nonce',
'gasPrice',
'gas',
'to',
'value',
'data',
'chainId', # set chainId to None if you want a transaction that can be replayed across networks
} In ethers.js, the allowed fields include Could you help understand this ? |
Beta Was this translation helpful? Give feedback.
-
I have resolved this issue, as @ricmoo Thanks for the help. |
Beta Was this translation helpful? Give feedback.
I have resolved this issue, as
gasLimit
in ethers.js is same asgas
in eth-account (web3.py).@ricmoo Thanks for the help.