-
Notifications
You must be signed in to change notification settings - Fork 465
@0x/utils: fix wrong RPC method in getChainIdAsync() #2270
Conversation
It was using net_version, but it should be using the eth_chainId method introduced in EIP-695. I'm not sure whether/how the network ID differs from the chain ID on mainnet and the testnets, but in Ganache in particular, the network ID is 50 while the chain ID is 1337, and this difference was causing problems for Python tests. Specifically, the Web3.py interface `Web3.eth.chainId` invokes the eth_chainId method, and the result feeds into the order hash, which wasn't lining up with the non-Python side of things.
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.
👀👍
We're passing in the Pedro's article on |
packages/utils/package.json
Outdated
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@0x/utils", | |||
"version": "4.6.0-beta.0", | |||
"version": "4.6.0-beta.1", |
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.
Please don't bump the version here, this is done by Lerna at publish time.
Should we bump |
It was using
net_version
, but it should be using theeth_chainId
method introduced in EIP-695. I'm not sure whether/how the network ID differs from the chain ID on mainnet and the testnets, but in Ganache in particular, the network ID is 50 while the chain ID is 1337, and this difference was causing problems for Python tests. Specifically, the Web3.py interfaceWeb3.eth.chainId
invokeseth_chainId
, and the result feeds into the order hash, which wasn't lining up with the non-Python side of things.