IWormholeRelayer
Title: IWormholeRelayer / IWormholeReceiver
Author: Vendored minimal subset of the Wormhole Solidity SDK
(https://github.com/wormhole-foundation/wormhole-solidity-sdk). Upstream license: Apache-2.0. Only the methods the WormholeGatewayAdapter calls/implements are re-declared. Vendored subset — do not add a wormhole-solidity-sdk dependency.
IWormholeRelayer is the standard relayer (send + quote); IWormholeReceiver is the callback
the relayer invokes on delivery. Addresses are Wormhole "universal" 32-byte addresses.
Functions
sendPayloadToEvm
Request delivery of payload to targetAddress on targetChain (Wormhole chain id).
function sendPayloadToEvm(
uint16 targetChain,
address targetAddress,
bytes calldata payload,
uint256 receiverValue,
uint256 gasLimit,
uint16 refundChain,
address refundAddress
) external payable returns (uint64 sequence);Parameters
| Name | Type | Description |
|---|---|---|
| targetChain | uint16 | |
| targetAddress | address | |
| payload | bytes | |
| receiverValue | uint256 | |
| gasLimit | uint256 | |
| refundChain | uint16 | |
| refundAddress | address |
Returns
| Name | Type | Description |
|---|---|---|
| sequence | uint64 |
quoteEVMDeliveryPrice
Quote the native cost of an EVM delivery with gasLimit + receiverValue to targetChain.
function quoteEVMDeliveryPrice(uint16 targetChain, uint256 receiverValue, uint256 gasLimit)
external
view
returns (uint256 nativePriceQuote, uint256 targetChainRefundPerGasUnused);Parameters
| Name | Type | Description |
|---|---|---|
| targetChain | uint16 | |
| receiverValue | uint256 | |
| gasLimit | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| nativePriceQuote | uint256 | |
| targetChainRefundPerGasUnused | uint256 |