-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: add chainId to txn params #2450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add chainId to txn params #2450
Conversation
Nice catch! I don't think there is a way to indicate that it's optional, but I don't think we do any checks on it. Lmk if you want help debugging the tests. It looks like they're failing because a hex-to-int conversion isn't happening for the error message in the validation middleware. |
c7e537c
to
e55aa98
Compare
I believe I got it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks!
* fix: add chainId to txn params * fix: error message on chain id hex to int * Add newsfragment Co-authored-by: kclowes <[email protected]>
* fix: add chainId to txn params * fix: error message on chain id hex to int * Add newsfragment Co-authored-by: kclowes <[email protected]> Co-authored-by: Juliya Smith <[email protected]>
* fix: add chainId to txn params * fix: error message on chain id hex to int * Add newsfragment Co-authored-by: kclowes <[email protected]>
What was wrong?
I noticed even when caching
chain_id
, the request occurs multiple times. I figured out this happens because I am callingestimate_gas()
and passing it a transaction and the RPC method's defined txn schema does not incluechainId
so it makes the request againt to add the chainId at some point (this is only deduced).. By addingchainId
to the params, I can avoid an extra RPC call to get the chain ID`How was it fixed?
Add
'chainId': 'uint',
inTRANSACTION_PARAMS_ABIS
.Todo:
Cute Animal Picture