@@ -10,7 +10,6 @@ import (
10
10
"github.com/gin-gonic/gin"
11
11
"github.com/spf13/viper"
12
12
"github.com/stackup-wallet/stackup-bundler/pkg/signer"
13
- "github.com/stackup-wallet/stackup-bundler/pkg/tracer"
14
13
)
15
14
16
15
type Values struct {
@@ -21,6 +20,7 @@ type Values struct {
21
20
DataDirectory string
22
21
SupportedEntryPoints []common.Address
23
22
MaxVerificationGas * big.Int
23
+ MaxBatchGasLimit * big.Int
24
24
MaxOpsForUnstakedSender int
25
25
Beneficiary string
26
26
@@ -33,10 +33,8 @@ type Values struct {
33
33
BlocksInTheFuture int
34
34
35
35
// Undocumented variables.
36
- DebugMode bool
37
- GinMode string
38
- BundlerCollectorTracer string
39
- BundlerErrorTracer string
36
+ DebugMode bool
37
+ GinMode string
40
38
}
41
39
42
40
func envArrayToAddressSlice (s string ) []common.Address {
@@ -61,6 +59,7 @@ func GetValues() *Values {
61
59
viper .SetDefault ("erc4337_bundler_data_directory" , "/tmp/stackup_bundler" )
62
60
viper .SetDefault ("erc4337_bundler_supported_entry_points" , "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" )
63
61
viper .SetDefault ("erc4337_bundler_max_verification_gas" , 1500000 )
62
+ viper .SetDefault ("erc4337_bundler_max_batch_gas_limit" , 25000000 )
64
63
viper .SetDefault ("erc4337_bundler_max_ops_for_unstaked_sender" , 4 )
65
64
viper .SetDefault ("erc4337_bundler_blocks_in_the_future" , 25 )
66
65
viper .SetDefault ("erc4337_bundler_debug_mode" , false )
@@ -87,6 +86,7 @@ func GetValues() *Values {
87
86
_ = viper .BindEnv ("erc4337_bundler_supported_entry_points" )
88
87
_ = viper .BindEnv ("erc4337_bundler_beneficiary" )
89
88
_ = viper .BindEnv ("erc4337_bundler_max_verification_gas" )
89
+ _ = viper .BindEnv ("erc4337_bundler_max_batch_gas_limit" )
90
90
_ = viper .BindEnv ("erc4337_bundler_max_ops_for_unstaked_sender" )
91
91
_ = viper .BindEnv ("erc4337_bundler_relayer_banned_threshold" )
92
92
_ = viper .BindEnv ("erc4337_bundler_relayer_banned_time_window" )
@@ -119,12 +119,6 @@ func GetValues() *Values {
119
119
}
120
120
}
121
121
122
- // Load js tracers from embedded file
123
- trc , err := tracer .NewTracers ()
124
- if err != nil {
125
- panic (err )
126
- }
127
-
128
122
// Return Values
129
123
privateKey := viper .GetString ("erc4337_bundler_private_key" )
130
124
ethClientUrl := viper .GetString ("erc4337_bundler_eth_client_url" )
@@ -133,6 +127,7 @@ func GetValues() *Values {
133
127
supportedEntryPoints := envArrayToAddressSlice (viper .GetString ("erc4337_bundler_supported_entry_points" ))
134
128
beneficiary := viper .GetString ("erc4337_bundler_beneficiary" )
135
129
maxVerificationGas := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_verification_gas" )))
130
+ maxBatchGasLimit := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_batch_gas_limit" )))
136
131
maxOpsForUnstakedSender := viper .GetInt ("erc4337_bundler_max_ops_for_unstaked_sender" )
137
132
relayerBannedThreshold := viper .GetInt ("erc4337_bundler_relayer_banned_threshold" )
138
133
relayerBannedTimeWindow := viper .GetInt ("erc4337_bundler_relayer_banned_time_window" ) * int (time .Second )
@@ -148,14 +143,13 @@ func GetValues() *Values {
148
143
SupportedEntryPoints : supportedEntryPoints ,
149
144
Beneficiary : beneficiary ,
150
145
MaxVerificationGas : maxVerificationGas ,
146
+ MaxBatchGasLimit : maxBatchGasLimit ,
151
147
MaxOpsForUnstakedSender : maxOpsForUnstakedSender ,
152
148
RelayerBannedThreshold : relayerBannedThreshold ,
153
149
RelayerBannedTimeWindow : time .Duration (relayerBannedTimeWindow ),
154
150
EthBuilderUrl : ethBuilderUrl ,
155
151
BlocksInTheFuture : blocksInTheFuture ,
156
152
DebugMode : debugMode ,
157
153
GinMode : ginMode ,
158
- BundlerCollectorTracer : trc .BundlerCollectorTracer ,
159
- BundlerErrorTracer : trc .BundlerErrorTracer ,
160
154
}
161
155
}
0 commit comments