Mismatching chain ids between web3.eth.chainId and chainid opcode
- Dominant language
- Python
- Stars
- 5.5k
- Forks
- 1.7k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 2
Description
Calling `web3.eth.chainId` will return the chain id as set in
https://github.com/ethereum/web3.py/blob/master/web3/providers/eth_tester/defaults.py#L215, but using
```solididty
uint256 id;
assembly {
id := chainid()
}
```
returns 0 as `id`, which is the default value in pyevm.
There should be a way to set up an `EthereumTesterProvider` so that these match up. Ideally, this would be the default when doing
```solididty
ethereum_tester = EthereumTester(PyEVMBackend())
provider = EthereumTesterProvider(ethereum_tester)
web3 = Web3(provider)
```
Is this issue something that can/should be fixed in web3, or should I move it to eth_tester or pyevm?
Contributor guide
Assessment
This issue has not been assessed yet.