go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

The chain_id queried in the contract is 1

Open RyanHubs opened this issue 3 years ago • 1 comments

contract: 0xF1EDBA79FDFbc3ce24A8d9a30c9779A65f9b142A expected: chainid()=513100

/// @dev Returns the chain id used by this contract.
    function getChainId() public view returns (uint256) {
        uint256 id;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            id := chainid()
        }
        return id;
    }
image

RyanHubs avatar Sep 21 '22 15:09 RyanHubs

How are you running geth?

s1na avatar Sep 21 '22 15:09 s1na