44 "fmt"
55 "math/big"
66 "strings"
7+ "time"
78
89 "github.com/ethereum/go-ethereum/common"
910 "github.com/gin-gonic/gin"
@@ -20,6 +21,7 @@ type Values struct {
2021 SupportedEntryPoints []common.Address
2122 MaxVerificationGas * big.Int
2223 MaxBatchGasLimit * big.Int
24+ MaxOpTTL time.Duration
2325 MaxOpsForUnstakedSender int
2426 Beneficiary string
2527
@@ -73,6 +75,7 @@ func GetValues() *Values {
7375 viper .SetDefault ("erc4337_bundler_supported_entry_points" , "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" )
7476 viper .SetDefault ("erc4337_bundler_max_verification_gas" , 3000000 )
7577 viper .SetDefault ("erc4337_bundler_max_batch_gas_limit" , 25000000 )
78+ viper .SetDefault ("erc4337_bundler_max_op_ttl_seconds" , 180 )
7679 viper .SetDefault ("erc4337_bundler_max_ops_for_unstaked_sender" , 4 )
7780 viper .SetDefault ("erc4337_bundler_blocks_in_the_future" , 25 )
7881 viper .SetDefault ("erc4337_bundler_otel_insecure_mode" , false )
@@ -101,6 +104,7 @@ func GetValues() *Values {
101104 _ = viper .BindEnv ("erc4337_bundler_beneficiary" )
102105 _ = viper .BindEnv ("erc4337_bundler_max_verification_gas" )
103106 _ = viper .BindEnv ("erc4337_bundler_max_batch_gas_limit" )
107+ _ = viper .BindEnv ("erc4337_bundler_max_op_ttl_seconds" )
104108 _ = viper .BindEnv ("erc4337_bundler_max_ops_for_unstaked_sender" )
105109 _ = viper .BindEnv ("erc4337_bundler_eth_builder_url" )
106110 _ = viper .BindEnv ("erc4337_bundler_blocks_in_the_future" )
@@ -150,6 +154,7 @@ func GetValues() *Values {
150154 beneficiary := viper .GetString ("erc4337_bundler_beneficiary" )
151155 maxVerificationGas := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_verification_gas" )))
152156 maxBatchGasLimit := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_batch_gas_limit" )))
157+ maxOpTTL := time .Second * viper .GetDuration ("erc4337_bundler_max_op_ttl_seconds" )
153158 maxOpsForUnstakedSender := viper .GetInt ("erc4337_bundler_max_ops_for_unstaked_sender" )
154159 ethBuilderUrl := viper .GetString ("erc4337_bundler_eth_builder_url" )
155160 blocksInTheFuture := viper .GetInt ("erc4337_bundler_blocks_in_the_future" )
@@ -168,6 +173,7 @@ func GetValues() *Values {
168173 Beneficiary : beneficiary ,
169174 MaxVerificationGas : maxVerificationGas ,
170175 MaxBatchGasLimit : maxBatchGasLimit ,
176+ MaxOpTTL : maxOpTTL ,
171177 MaxOpsForUnstakedSender : maxOpsForUnstakedSender ,
172178 EthBuilderUrl : ethBuilderUrl ,
173179 BlocksInTheFuture : blocksInTheFuture ,
0 commit comments