Skip to content

Commit

Permalink
Update one test to pass optional block param to EthEstimateGas
Browse files Browse the repository at this point in the history
  • Loading branch information
fridrik01 authored and i-norden committed Dec 14, 2023
1 parent 0db343a commit 825b514
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions itests/eth_transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 825b514

Please sign in to comment.