feat: re-configuring gas limit to 2m on deployment#157
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the gas limit configuration for deployment by reducing the value from 20m to 2m to prevent excessive gas allocation during contract initialization.
- Reduced the message gas limit in EverclearSpokeV3.sol
- Reduced the message gas limit in EverclearSpoke.sol
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/contracts/src/contracts/intent/EverclearSpokeV3.sol | Updated gas limit value from 20_000_000 to 2_000_000 |
| packages/contracts/src/contracts/intent/EverclearSpoke.sol | Updated gas limit value from 20_000_000 to 2_000_000 |
| callExecutor = _init.callExecutor; | ||
| EVERCLEAR = _init.hubDomain; | ||
| messageGasLimit = 20_000_000; | ||
| messageGasLimit = 2_000_000; |
There was a problem hiding this comment.
[nitpick] Consider adding an explanatory comment or a named constant to clarify why the gas limit is set to 2,000,000. This will help future maintainers understand the rationale behind the magic number.
| messageGasLimit = 2_000_000; | |
| messageGasLimit = DEFAULT_MESSAGE_GAS_LIMIT; // Set the default gas limit for message execution |
| callExecutor = _init.callExecutor; | ||
| EVERCLEAR = _init.hubDomain; | ||
| messageGasLimit = 20_000_000; | ||
| messageGasLimit = 2_000_000; |
There was a problem hiding this comment.
[nitpick] Consider adding an explanatory comment or a named constant to clarify why the gas limit is set to 2,000,000. This will help future maintainers understand the rationale behind the magic number.
| messageGasLimit = 2_000_000; | |
| // Set the default gas limit for message execution. This value is chosen to ensure | |
| // sufficient gas for most operations while avoiding excessive gas usage. | |
| messageGasLimit = DEFAULT_MESSAGE_GAS_LIMIT; |
🤖 Linear
Updated gas limit in initializer from 20m to 2m, resolving gas limit being too high at deployment time.