-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GasLimitOverride for manuallyExecute (#1375)
## Motivation 1. OffRamp should now use destExecData to extract the gas used for 2. Manual execution should enable user to override the gas amount for releaseOrMint per token. ## Solution 1. Removed int32 `maxTokenTransferGas` & `maxPoolReleaseOrMintGas` and used the gas encoded in `RampTokenAmount.destExecData` 2. add a new Struct which holds the receiverExecutionGasLimit and transferGasAmounts ``` struct GasLimitOverride { uint256 receiverExecutionGasLimit; uint256[] tokenGasOverrides; } ``` tokenGasOverrides is an array of GasLimits to be used during the relaseOrMint call for the specific tokenPool associated with token Note: The gas limit can not be lowered as that could cause the message to fail. If manual execution is done from an UNTOUCHED state and we would allow lower gas limit, anyone could grief by executing the message with lower gas limit than the DON would have used. This results in the message being marked FAILURE and the DON would not attempt it with the correct gas limit. for the above we have kept a check that `tokenGasOverrides` < gas encoded in `RampTokenAmount.destExecData` --------- Signed-off-by: 0xsuryansh <[email protected]> Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com>
- Loading branch information
1 parent
fd212e6
commit 49fde28
Showing
12 changed files
with
517 additions
and
326 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.