Skip to content

Commit 82c434e

Browse files
committed
Get cost directly rather than as argument
1 parent 37ad63f commit 82c434e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WormholeRelayerSDK.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pragma solidity ^0.8.13;
44
import "./interfaces/IWormholeReceiver.sol";
55
import "./interfaces/IWormholeRelayer.sol";
66
import "./interfaces/ITokenBridge.sol";
7-
import "./interfaces/IERC20.sol";
7+
import {IERC20} from "./interfaces/IERC20.sol";
88

99
import "./Utils.sol";
1010

@@ -134,13 +134,13 @@ abstract contract TokenSender is TokenBase {
134134
bytes memory payload,
135135
uint256 receiverValue,
136136
uint256 gasLimit,
137-
uint256 cost,
138137
address token,
139138
uint256 amount
140139
) internal returns (uint64) {
141140
VaaKey[] memory vaaKeys = new VaaKey[](1);
142141
vaaKeys[0] = transferTokens(token, amount, targetChain, targetAddress);
143142

143+
(uint256 cost,) = wormholeRelayer.quoteEVMDeliveryPrice(targetChain, receiverValue, gasLimit);
144144
return wormholeRelayer.sendVaasToEvm{value: cost}(
145145
targetChain, targetAddress, payload, receiverValue, gasLimit, vaaKeys
146146
);

0 commit comments

Comments
 (0)