Skip to content

Commit e581f26

Browse files
committed
accounts/abi/bind/backends: estimate needed gas, not used
1 parent 6197fbf commit e581f26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

accounts/abi/bind/backends/simulated.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func (b *SimulatedBackend) EstimateGasLimit(sender common.Address, contract *com
152152
vmenv := core.NewEnv(statedb, chainConfig, b.blockchain, msg, block.Header(), vm.Config{})
153153
gaspool := new(core.GasPool).AddGas(common.MaxBig)
154154

155-
_, gas, err := core.ApplyMessage(vmenv, msg, gaspool)
155+
_, gas, _, err := core.NewStateTransition(vmenv, msg, gaspool).TransitionDb()
156156
return gas, err
157157
}
158158

0 commit comments

Comments
 (0)