diff --git a/shared/services/services.go b/shared/services/services.go index 3824d8d1..7e5af859 100644 --- a/shared/services/services.go +++ b/shared/services/services.go @@ -508,7 +508,8 @@ func getWallet(c *cli.Context, cfg *config.StaderConfig, pm *passwords.PasswordM chainId := cfg.StaderNode.GetChainID() - nodeWallet, err = wallet.NewWallet(os.ExpandEnv(cfg.StaderNode.GetWalletPath()), chainId, maxFee, maxPriorityFee, 0, pm) + gasLimit := c.GlobalUint64("gasLimit") + nodeWallet, err = wallet.NewWallet(os.ExpandEnv(cfg.StaderNode.GetWalletPath()), chainId, maxFee, maxPriorityFee, gasLimit, pm) if err != nil { return } diff --git a/shared/services/stader/client.go b/shared/services/stader/client.go index ce5eed6d..23fa7ae8 100644 --- a/shared/services/stader/client.go +++ b/shared/services/stader/client.go @@ -1715,7 +1715,7 @@ func (c *Client) getGasOpts() string { var opts string opts += fmt.Sprintf("--maxFee %f ", c.maxFee) opts += fmt.Sprintf("--maxPrioFee %f ", c.maxPrioFee) - opts += fmt.Sprintf("--gasLimit %d ", 100000) + opts += fmt.Sprintf("--gasLimit %d ", c.gasLimit) return opts } diff --git a/stader-cli/stader-cli.go b/stader-cli/stader-cli.go index 9b1e04b9..e953d120 100644 --- a/stader-cli/stader-cli.go +++ b/stader-cli/stader-cli.go @@ -756,6 +756,10 @@ Public License instead of this License. But first, please read Name: "maxPrioFee, i", Usage: "The max priority fee you want a transaction to use, in gwei", }, + cli.Uint64Flag{ + Name: "gasLimit", + Usage: "Custom gas limit, using gas estimate if not specified", + }, cli.StringFlag{ Name: "nonce", Usage: "Use this flag to explicitly specify the nonce that this transaction should use, so it can override an existing 'stuck' transaction", diff --git a/stader-lib/stader/contract.go b/stader-lib/stader/contract.go index 164d57dd..2eaa2703 100644 --- a/stader-lib/stader/contract.go +++ b/stader-lib/stader/contract.go @@ -37,7 +37,7 @@ import ( // Transaction settings const ( GasLimitMultiplier float64 = 1.5 - MaxGasLimit uint64 = 50000000 + MaxGasLimit uint64 = 30000000 ) // Contract type wraps go-ethereum bound contract