@@ -9,21 +9,22 @@ import (
99 "github.com/ethereum/go-ethereum/common"
1010 "github.com/gin-gonic/gin"
1111 "github.com/spf13/viper"
12+ "github.com/stackup-wallet/stackup-bundler/pkg/modules/entities"
1213 "github.com/stackup-wallet/stackup-bundler/pkg/signer"
1314)
1415
1516type Values struct {
1617 // Documented variables.
17- PrivateKey string
18- EthClientUrl string
19- Port int
20- DataDirectory string
21- SupportedEntryPoints []common.Address
22- MaxVerificationGas * big.Int
23- MaxBatchGasLimit * big.Int
24- MaxOpTTL time.Duration
25- MaxOpsForUnstakedSender int
26- Beneficiary string
18+ PrivateKey string
19+ EthClientUrl string
20+ Port int
21+ DataDirectory string
22+ SupportedEntryPoints []common.Address
23+ MaxVerificationGas * big.Int
24+ MaxBatchGasLimit * big.Int
25+ MaxOpTTL time.Duration
26+ Beneficiary string
27+ ReputationConstants * entities. ReputationConstants
2728
2829 // Searcher mode variables.
2930 EthBuilderUrls []string
@@ -84,10 +85,9 @@ func GetValues() *Values {
8485 viper .SetDefault ("erc4337_bundler_port" , 4337 )
8586 viper .SetDefault ("erc4337_bundler_data_directory" , "/tmp/stackup_bundler" )
8687 viper .SetDefault ("erc4337_bundler_supported_entry_points" , "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" )
87- viper .SetDefault ("erc4337_bundler_max_verification_gas" , 3000000 )
88- viper .SetDefault ("erc4337_bundler_max_batch_gas_limit" , 25000000 )
88+ viper .SetDefault ("erc4337_bundler_max_verification_gas" , 6000000 )
89+ viper .SetDefault ("erc4337_bundler_max_batch_gas_limit" , 18000000 )
8990 viper .SetDefault ("erc4337_bundler_max_op_ttl_seconds" , 180 )
90- viper .SetDefault ("erc4337_bundler_max_ops_for_unstaked_sender" , 4 )
9191 viper .SetDefault ("erc4337_bundler_blocks_in_the_future" , 6 )
9292 viper .SetDefault ("erc4337_bundler_otel_insecure_mode" , false )
9393 viper .SetDefault ("erc4337_bundler_debug_mode" , false )
@@ -116,7 +116,6 @@ func GetValues() *Values {
116116 _ = viper .BindEnv ("erc4337_bundler_max_verification_gas" )
117117 _ = viper .BindEnv ("erc4337_bundler_max_batch_gas_limit" )
118118 _ = viper .BindEnv ("erc4337_bundler_max_op_ttl_seconds" )
119- _ = viper .BindEnv ("erc4337_bundler_max_ops_for_unstaked_sender" )
120119 _ = viper .BindEnv ("erc4337_bundler_eth_builder_urls" )
121120 _ = viper .BindEnv ("erc4337_bundler_blocks_in_the_future" )
122121 _ = viper .BindEnv ("erc4337_bundler_otel_service_name" )
@@ -174,7 +173,6 @@ func GetValues() *Values {
174173 maxVerificationGas := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_verification_gas" )))
175174 maxBatchGasLimit := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_batch_gas_limit" )))
176175 maxOpTTL := time .Second * viper .GetDuration ("erc4337_bundler_max_op_ttl_seconds" )
177- maxOpsForUnstakedSender := viper .GetInt ("erc4337_bundler_max_ops_for_unstaked_sender" )
178176 ethBuilderUrls := envArrayToStringSlice (viper .GetString ("erc4337_bundler_eth_builder_urls" ))
179177 blocksInTheFuture := viper .GetInt ("erc4337_bundler_blocks_in_the_future" )
180178 otelServiceName := viper .GetString ("erc4337_bundler_otel_service_name" )
@@ -186,25 +184,25 @@ func GetValues() *Values {
186184 debugMode := viper .GetBool ("erc4337_bundler_debug_mode" )
187185 ginMode := viper .GetString ("erc4337_bundler_gin_mode" )
188186 return & Values {
189- PrivateKey : privateKey ,
190- EthClientUrl : ethClientUrl ,
191- Port : port ,
192- DataDirectory : dataDirectory ,
193- SupportedEntryPoints : supportedEntryPoints ,
194- Beneficiary : beneficiary ,
195- MaxVerificationGas : maxVerificationGas ,
196- MaxBatchGasLimit : maxBatchGasLimit ,
197- MaxOpTTL : maxOpTTL ,
198- MaxOpsForUnstakedSender : maxOpsForUnstakedSender ,
199- EthBuilderUrls : ethBuilderUrls ,
200- BlocksInTheFuture : blocksInTheFuture ,
201- OTELServiceName : otelServiceName ,
202- OTELCollectorHeaders : otelCollectorHeader ,
203- OTELCollectorUrl : otelCollectorUrl ,
204- OTELInsecureMode : otelInsecureMode ,
205- AltMempoolIPFSGateway : altMempoolIPFSGateway ,
206- AltMempoolIds : altMempoolIds ,
207- DebugMode : debugMode ,
208- GinMode : ginMode ,
187+ PrivateKey : privateKey ,
188+ EthClientUrl : ethClientUrl ,
189+ Port : port ,
190+ DataDirectory : dataDirectory ,
191+ SupportedEntryPoints : supportedEntryPoints ,
192+ Beneficiary : beneficiary ,
193+ MaxVerificationGas : maxVerificationGas ,
194+ MaxBatchGasLimit : maxBatchGasLimit ,
195+ MaxOpTTL : maxOpTTL ,
196+ ReputationConstants : NewReputationConstantsFromEnv () ,
197+ EthBuilderUrls : ethBuilderUrls ,
198+ BlocksInTheFuture : blocksInTheFuture ,
199+ OTELServiceName : otelServiceName ,
200+ OTELCollectorHeaders : otelCollectorHeader ,
201+ OTELCollectorUrl : otelCollectorUrl ,
202+ OTELInsecureMode : otelInsecureMode ,
203+ AltMempoolIPFSGateway : altMempoolIPFSGateway ,
204+ AltMempoolIds : altMempoolIds ,
205+ DebugMode : debugMode ,
206+ GinMode : ginMode ,
209207 }
210208}
0 commit comments