Add test for eth_call
This commit is contained in:
parent
2a73e1c2e1
commit
7acdb49074
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user