Contract Interface
transferOut
OmniService transfer out of message data
Note: transferOut
will be deprecated, it is recommended to use messageOut
instead.
function
parameters
_toChain
uint256
Target chain id to transfer out
_messageData
bytes
This is the information encoded from MessageData
_feeToken
address
This is the address of the token you want to use to pay the fee
Return Value
bytes32
The order ID of the cross-chain message
messageOut
OnmiService sends a cross-chain message
Function
Parameters
_transferId
bytes32
Custom identifier provided by the caller
_initiator
address
The actual address of the message initiator, which is typically a user address
_referrer
address
Custom parameter provided by the caller, which can serve as an identifier for the caller
_toChain
uint256
The chain id of the target chain
_messageData
bytes
This is the information encoded from MessageData
_feeToken
address
This is the address of the token you want to use to pay the fee
Return Value
bytes32
The order ID of the cross-chain message
retryMessageIn
When a message execution fails, the contract stores the hash of the relevant information. Passing the corresponding parameters allows for retrying the execution of the cross-chain message.
Function
Parameters
_orderId
bytes32
The order ID of the cross-chain message
_fromChain
uint256
The chain ID of the source chain
_fromAddress
bytes
The address of the source chain
_messageData
bytes
This is the messageData
validated by the source chain
getMessageFee
Get the specific fee for the target chain.
Function
Parameters
_toChain
uint256
The chain id of the target chain
_feeToken
address
This is the address of the token you want to use to pay the fee
_gasLimit
uint256
Customizable gas limit
Return Value
amount
uint256
The amount of the fee
receiverAddress
address
The address that receives the fee.
CallData Interface
addRemoteCaller
Granting the source chain the chain ID and address permissions to execute messages.
Function
Parameters
_fromChain
uint256
The chain ID of the source chain
_fromAddress
bytes
The address of the source chain
_tag
bool
True indicates permission granted, false indicates permission not granted
getExecutePermission
To check if the source chain's chain ID and address have permission to execute cross-chain messages on the target chain:
True means permission is granted (可以执行).
False means permission is not granted (不行).
Function
Parameters
_targetAddress
address
The contract address on the target chain
_fromChain
uint256
The chain id of the target chain
_fromAddress
bytes
The address of the source chain
Return Value
bool
True indicates permission granted, false indicates permission not granted.
Last updated