Skip to content

Commit

Permalink
allow override of refund per gas unused
Browse files Browse the repository at this point in the history
  • Loading branch information
derpy-duck committed Oct 10, 2023
1 parent 1ea5809 commit b26c2ab
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion ethereum/contracts/interfaces/relayer/IWormholeRelayer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ interface IWormholeRelayerSend is IWormholeRelayerBase {
* @notice *** This will only be able to succeed if the following is true **
* - newGasLimit >= gas limit of the old instruction
* - newReceiverValue >= receiver value of the old instruction
* - newDeliveryProvider's `targetChainRefundPerGasUnused` >= old relay provider's `targetChainRefundPerGasUnused`
*/
function resendToEvm(
VaaKey memory deliveryVaaKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ interface IWormholeRelayerSend is IWormholeRelayerBase {
* @notice *** This will only be able to succeed if the following is true **
* - newGasLimit >= gas limit of the old instruction
* - newReceiverValue >= receiver value of the old instruction
* - newDeliveryProvider's `targetChainRefundPerGasUnused` >= old relay provider's `targetChainRefundPerGasUnused`
*/
function resendToEvm(
VaaKey memory deliveryVaaKey,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
VaaKeysDoNotMatchVaas,
InvalidOverrideGasLimit,
InvalidOverrideReceiverValue,
InvalidOverrideRefundPerGasUnused,
RequesterNotWormholeRelayer,
DeliveryProviderCannotReceivePayment,
MessageKey,
Expand Down Expand Up @@ -219,12 +218,6 @@ abstract contract WormholeRelayerDelivery is WormholeRelayerBase, IWormholeRelay
decodeEvmExecutionInfoV1(deliveryOverrides.newExecutionInfo);
deliveryOverridesReceiverValue = deliveryOverrides.newReceiverValue;

if (
deliveryOverridesExecutionInfo.targetChainRefundPerGasUnused.unwrap()
< executionInfo.targetChainRefundPerGasUnused.unwrap()
) {
revert InvalidOverrideRefundPerGasUnused();
}
if (deliveryOverridesExecutionInfo.gasLimit < executionInfo.gasLimit) {
revert InvalidOverrideGasLimit();
}
Expand Down

0 comments on commit b26c2ab

Please sign in to comment.