forked from cerc-io/laconicd-deprecated
rpc: implement eth_chainId (#379)
* add eth_chainId * add nolint * use clientCtx chainID * rpc: eth_chainId test Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
This commit is contained in:
@@ -130,6 +130,15 @@ func TestEth_protocolVersion(t *testing.T) {
|
||||
require.Equal(t, expectedRes, res, "expected: %s got: %s\n", expectedRes.String(), rpcRes.Result)
|
||||
}
|
||||
|
||||
func TestEth_chainId(t *testing.T) {
|
||||
rpcRes := call(t, "eth_chainId", []string{})
|
||||
|
||||
var res hexutil.Uint
|
||||
err := res.UnmarshalJSON(rpcRes.Result)
|
||||
require.NoError(t, err)
|
||||
require.NotEqual(t, "0x0", res.String())
|
||||
}
|
||||
|
||||
func TestEth_blockNumber(t *testing.T) {
|
||||
rpcRes := call(t, "eth_blockNumber", []string{})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user