Transshipment

The main contract for handling transshipment operations. Implements ITransshipment interface, includes TransshipmentWorker functionality, and uses EIP712 for structured signature verification.

Solidity API

NAME

string NAME

VERSION

string VERSION

accountImplementation

address accountImplementation

manager

address manager

accounts

mapping(address => bool) accounts

userNonce

mapping(address => uint256) userNonce

constructor

constructor(address _router, address _link, address _accountImplementation, address _manager) public

getCreatedAccountAddress

function getCreatedAccountAddress(address userAddress) public view returns (address)

Retrieves the address of the created account for a given user.

Parameters

Return Values

getAccountAddress

function getAccountAddress(address userAddress) public view returns (address)

Calculates the deterministic address for an account based on the user's address.

Parameters

Return Values

createAccount

function createAccount(string name, uint8 accountType) external returns (address accountAddress)

Creates a new account for the caller.

Parameters

Return Values

sendUniversalMassage

function sendUniversalMassage(struct ITransshipmentStructures.MassageParam[] massageParams) external

Sends multiple universal messages to the system.

Parameters

bridgeTokens

function bridgeTokens(bytes managerProof, address feeToken, uint256 gasLimit, uint256 feeAmount, struct ITransshipmentStructures.BridgeParams params) external payable

Initiates the bridging of tokens from the current chain to another chain using the Cross-Chain Interaction Protocol (CCIP).

Parameters

sendMassage

function sendMassage(struct ITransshipmentStructures.MassageParam massageParam) public payable

Sends a Cross-Chain Interaction Protocol (CCIP) message initiated by a regular user.

Parameters

systemSendMassage

function systemSendMassage(struct ITransshipmentStructures.MassageParam massageParam, address senderAddress) public payable

Sends a Cross-Chain Interaction Protocol (CCIP) message initiated by the system.

Parameters

_sendMessage

function _sendMessage(struct ITransshipmentStructures.MassageParam massageParam, address senderAddress) internal returns (bytes32 messageId)

Sends a Cross-Chain Interaction Protocol (CCIP) message to a specified destination chain.

Parameters

Return Values

_ccipReceive

function _ccipReceive(struct Client.Any2EVMMessage any2EvmMessage) internal virtual

This function is internal and virtual, and it must only be called by allowlisted sources. This function emits a 'MessageReceived' event with relevant details upon successful execution.

Handles the reception of cross-chain input (CCIP) messages. This function validates the sender against the allowlist and processes the CCIP message. If the 'dataToExecute' field is not empty, the function executes the specified call. If the 'dataToSend' field is not empty, the function sends another CCIP message to the specified address.

Parameters

Last updated