Add test for eth_call

This commit is contained in:
Ian Davis 2023-01-24 14:03:31 +00:00
parent 2a73e1c2e1
commit 7acdb49074

View File

@ -327,15 +327,16 @@ func TestEthOpenRPCConformance(t *testing.T) {
},
},
// {
// method: "eth_call",
// call: func(a *ethAPIRaw) (json.RawMessage, error) {
// return ethapi.EthCall(context.Background(), ethtypes.EthCall{
// From: &senderEthAddr,
// Data: contractBin,
// }, "logEventZeroData")
// },
// },
{
method: "eth_call",
variant: "latest",
call: func(a *ethAPIRaw) (json.RawMessage, error) {
return ethapi.EthCall(context.Background(), ethtypes.EthCall{
From: &senderEthAddr,
Data: contractBin,
}, "latest")
},
},
{
method: "eth_estimateGas",
@ -376,6 +377,14 @@ func TestEthOpenRPCConformance(t *testing.T) {
return ethapi.EthGetStorageAt(context.Background(), contractEthAddr, ethtypes.EthBytes{0}, "0x0")
},
},
{
method: "eth_getBalance",
variant: "blocknumber",
call: func(a *ethAPIRaw) (json.RawMessage, error) {
return ethapi.EthGetBalance(context.Background(), contractEthAddr, "0x0")
},
},
}
for _, tc := range testCases {