9
9
"github.com/ethereum/go-ethereum/rpc"
10
10
"github.com/stackup-wallet/stackup-bundler/pkg/entrypoint/filter"
11
11
"github.com/stackup-wallet/stackup-bundler/pkg/gas"
12
+ "github.com/stackup-wallet/stackup-bundler/pkg/state"
12
13
"github.com/stackup-wallet/stackup-bundler/pkg/userop"
13
14
)
14
15
@@ -33,10 +34,18 @@ func GetUserOpReceiptWithEthClient(eth *ethclient.Client) GetUserOpReceiptFunc {
33
34
34
35
// GetGasEstimateFunc is a general interface for fetching an estimate for verificationGasLimit and
35
36
// callGasLimit given a userOp and EntryPoint address.
36
- type GetGasEstimateFunc = func (ep common.Address , op * userop.UserOperation ) (verificationGas uint64 , callGas uint64 , err error )
37
+ type GetGasEstimateFunc = func (
38
+ ep common.Address ,
39
+ op * userop.UserOperation ,
40
+ sos state.OverrideSet ,
41
+ ) (verificationGas uint64 , callGas uint64 , err error )
37
42
38
43
func getGasEstimateNoop () GetGasEstimateFunc {
39
- return func (ep common.Address , op * userop.UserOperation ) (verificationGas uint64 , callGas uint64 , err error ) {
44
+ return func (
45
+ ep common.Address ,
46
+ op * userop.UserOperation ,
47
+ sos state.OverrideSet ,
48
+ ) (verificationGas uint64 , callGas uint64 , err error ) {
40
49
//lint:ignore ST1005 This needs to match the bundler test spec.
41
50
return 0 , 0 , errors .New ("Missing/invalid userOpHash" )
42
51
}
@@ -50,11 +59,16 @@ func GetGasEstimateWithEthClient(
50
59
chain * big.Int ,
51
60
maxGasLimit * big.Int ,
52
61
) GetGasEstimateFunc {
53
- return func (ep common.Address , op * userop.UserOperation ) (verificationGas uint64 , callGas uint64 , err error ) {
62
+ return func (
63
+ ep common.Address ,
64
+ op * userop.UserOperation ,
65
+ sos state.OverrideSet ,
66
+ ) (verificationGas uint64 , callGas uint64 , err error ) {
54
67
return gas .EstimateGas (& gas.EstimateInput {
55
68
Rpc : rpc ,
56
69
EntryPoint : ep ,
57
70
Op : op ,
71
+ Sos : sos ,
58
72
Ov : ov ,
59
73
ChainID : chain ,
60
74
MaxGasLimit : maxGasLimit ,
0 commit comments