Skip to content

Commit

Permalink
add comment about non-zero gaslimit
Browse files Browse the repository at this point in the history
Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele committed Sep 25, 2023
1 parent 0d41a26 commit 124eade
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/testing/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,9 @@ func makeGenTxOpts(chainID *big.Int, prv *ecdsa.PrivateKey) func(ctx context.Con
addr := gethcrypto.PubkeyToAddress(prv.PublicKey)
return func(ctx context.Context) *bind.TransactOpts {
return &bind.TransactOpts{
From: addr,
From: addr,
// Set non-zero value to avoid call `estimateGas`
// This allows we can extract the revert reason from the transaction receipt if the transaction fails.
GasLimit: 6382056,
Signer: func(address common.Address, tx *gethtypes.Transaction) (*gethtypes.Transaction, error) {
if address != addr {
Expand Down

0 comments on commit 124eade

Please sign in to comment.