Skip to content

Commit

Permalink
fix: transferRemote requires msg.value gas payments
Browse files Browse the repository at this point in the history
  • Loading branch information
junkim012 committed Oct 30, 2024
1 parent 062ef80 commit 6e4fc6c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/helper/WarpRouteWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ import { BoringVault } from "../base/BoringVault.sol";
import { TellerWithMultiAssetSupport } from "../base/Roles/TellerWithMultiAssetSupport.sol";

interface WarpRoute {
function transferRemote(uint32 _destination, bytes32 _recipient, uint256 _amountOrId) external returns (bytes32);
function transferRemote(
uint32 _destination,
bytes32 _recipient,
uint256 _amountOrId
)
external
payable
returns (bytes32);
}

/**
Expand Down Expand Up @@ -56,6 +63,7 @@ contract WarpRouteWrapper {
bytes32 recipient
)
external
payable
returns (uint256 sharesMinted, bytes32 messageId)
{
depositAsset.safeTransferFrom(msg.sender, address(this), depositAmount);
Expand All @@ -66,6 +74,6 @@ contract WarpRouteWrapper {

sharesMinted = teller.deposit(depositAsset, depositAmount, minimumMint);

messageId = warpRoute.transferRemote(destination, recipient, sharesMinted);
messageId = warpRoute.transferRemote{ value: msg.value }(destination, recipient, sharesMinted);
}
}

0 comments on commit 6e4fc6c

Please sign in to comment.