Update one test to pass optional block param to EthEstimateGas

This commit is contained in:
Fridrik Asmundsson 2023-11-29 15:17:05 +00:00 committed by i-norden
parent 0db343a164
commit 825b514c8b

View File

@ -43,10 +43,14 @@ func TestValueTransferValidSignature(t *testing.T) {
kit.SendFunds(ctx, t, client, deployer, types.FromFil(1000))
gasParams, err := json.Marshal(ethtypes.EthEstimateGasParams{Tx: ethtypes.EthCall{
From: &ethAddr,
Data: contract,
}})
blkParam := ethtypes.NewEthBlockNumberOrHashFromPredefined("latest")
gasParams, err := json.Marshal(ethtypes.EthEstimateGasParams{
Tx: ethtypes.EthCall{
From: &ethAddr,
Data: contract,
},
BlkParam: &blkParam,
})
require.NoError(t, err)
gaslimit, err := client.EthEstimateGas(ctx, gasParams)