@@ -10,7 +10,6 @@ import (
1010 "github.com/gin-gonic/gin"
1111 "github.com/spf13/viper"
1212 "github.com/stackup-wallet/stackup-bundler/pkg/signer"
13- "github.com/stackup-wallet/stackup-bundler/pkg/tracer"
1413)
1514
1615type Values struct {
@@ -21,6 +20,7 @@ type Values struct {
2120 DataDirectory string
2221 SupportedEntryPoints []common.Address
2322 MaxVerificationGas * big.Int
23+ MaxBatchGasLimit * big.Int
2424 MaxOpsForUnstakedSender int
2525 Beneficiary string
2626
@@ -33,10 +33,8 @@ type Values struct {
3333 BlocksInTheFuture int
3434
3535 // Undocumented variables.
36- DebugMode bool
37- GinMode string
38- BundlerCollectorTracer string
39- BundlerErrorTracer string
36+ DebugMode bool
37+ GinMode string
4038}
4139
4240func envArrayToAddressSlice (s string ) []common.Address {
@@ -61,6 +59,7 @@ func GetValues() *Values {
6159 viper .SetDefault ("erc4337_bundler_data_directory" , "/tmp/stackup_bundler" )
6260 viper .SetDefault ("erc4337_bundler_supported_entry_points" , "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" )
6361 viper .SetDefault ("erc4337_bundler_max_verification_gas" , 1500000 )
62+ viper .SetDefault ("erc4337_bundler_max_batch_gas_limit" , 25000000 )
6463 viper .SetDefault ("erc4337_bundler_max_ops_for_unstaked_sender" , 4 )
6564 viper .SetDefault ("erc4337_bundler_blocks_in_the_future" , 25 )
6665 viper .SetDefault ("erc4337_bundler_debug_mode" , false )
@@ -87,6 +86,7 @@ func GetValues() *Values {
8786 _ = viper .BindEnv ("erc4337_bundler_supported_entry_points" )
8887 _ = viper .BindEnv ("erc4337_bundler_beneficiary" )
8988 _ = viper .BindEnv ("erc4337_bundler_max_verification_gas" )
89+ _ = viper .BindEnv ("erc4337_bundler_max_batch_gas_limit" )
9090 _ = viper .BindEnv ("erc4337_bundler_max_ops_for_unstaked_sender" )
9191 _ = viper .BindEnv ("erc4337_bundler_relayer_banned_threshold" )
9292 _ = viper .BindEnv ("erc4337_bundler_relayer_banned_time_window" )
@@ -119,12 +119,6 @@ func GetValues() *Values {
119119 }
120120 }
121121
122- // Load js tracers from embedded file
123- trc , err := tracer .NewTracers ()
124- if err != nil {
125- panic (err )
126- }
127-
128122 // Return Values
129123 privateKey := viper .GetString ("erc4337_bundler_private_key" )
130124 ethClientUrl := viper .GetString ("erc4337_bundler_eth_client_url" )
@@ -133,6 +127,7 @@ func GetValues() *Values {
133127 supportedEntryPoints := envArrayToAddressSlice (viper .GetString ("erc4337_bundler_supported_entry_points" ))
134128 beneficiary := viper .GetString ("erc4337_bundler_beneficiary" )
135129 maxVerificationGas := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_verification_gas" )))
130+ maxBatchGasLimit := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_batch_gas_limit" )))
136131 maxOpsForUnstakedSender := viper .GetInt ("erc4337_bundler_max_ops_for_unstaked_sender" )
137132 relayerBannedThreshold := viper .GetInt ("erc4337_bundler_relayer_banned_threshold" )
138133 relayerBannedTimeWindow := viper .GetInt ("erc4337_bundler_relayer_banned_time_window" ) * int (time .Second )
@@ -148,14 +143,13 @@ func GetValues() *Values {
148143 SupportedEntryPoints : supportedEntryPoints ,
149144 Beneficiary : beneficiary ,
150145 MaxVerificationGas : maxVerificationGas ,
146+ MaxBatchGasLimit : maxBatchGasLimit ,
151147 MaxOpsForUnstakedSender : maxOpsForUnstakedSender ,
152148 RelayerBannedThreshold : relayerBannedThreshold ,
153149 RelayerBannedTimeWindow : time .Duration (relayerBannedTimeWindow ),
154150 EthBuilderUrl : ethBuilderUrl ,
155151 BlocksInTheFuture : blocksInTheFuture ,
156152 DebugMode : debugMode ,
157153 GinMode : ginMode ,
158- BundlerCollectorTracer : trc .BundlerCollectorTracer ,
159- BundlerErrorTracer : trc .BundlerErrorTracer ,
160154 }
161155}
0 commit comments