erigon-pulse/cmd/rpcdaemon/commands/eth_call_test.go
Alex Sharov 5ba3ea162a
Simulated backend and genesis to kv (#2104)
* move to kv

* move to kv

* move to kv

* move to kv

* move to kv

* move to kv

* merge

* merge

* merge

* merge

* merge

* merge

* merge

* merge
2021-06-05 16:17:04 +01:00

23 lines
587 B
Go

package commands
import (
"context"
"testing"
"github.com/ledgerwatch/erigon/common"
"github.com/ledgerwatch/erigon/internal/ethapi"
)
func TestEstimateGas(t *testing.T) {
db := createTestKV(t)
api := NewEthAPI(NewBaseApi(nil), db, nil, nil, nil, 5000000)
var from = common.HexToAddress("0x71562b71999873db5b286df957af199ec94617f7")
var to = common.HexToAddress("0x0d3ab14bbad3d99f4203bd7a11acb94882050e7e")
if _, err := api.EstimateGas(context.Background(), ethapi.CallArgs{
From: &from,
To: &to,
}, nil); err != nil {
t.Errorf("calling EstimateGas: %v", err)
}
}