Account
Represents a user account in the Transshipment system.
Solidity API
transshipment
address transshipment
owner
address owner
state
uint256 state
name
string name
accountType
uint8 accountType
receive
receive() external payable
initialize
function initialize(address _owner, address _transshipment, string _name, uint8 _accountType) external
Initializes the account with basic information.
Parameters
_owner
address
The owner's address.
_transshipment
address
The address of the associated Transshipment contract.
_name
string
The name of the account.
_accountType
uint8
The type of the account.
bridge
function bridge(address srcTokenAddress, address dstTokenAddress, uint256 dstTokenAmount, address dstReceiver, uint64 dstChainSelector, address feeToken, uint256 gasLimit) external payable
Bridges tokens from the current account to another chain using Transshipment.
Parameters
srcTokenAddress
address
The source token address.
dstTokenAddress
address
The destination token address.
dstTokenAmount
uint256
The amount of tokens to be bridged to the destination chain.
dstReceiver
address
The receiver's address on the destination chain.
dstChainSelector
uint64
The selector for the destination chain.
feeToken
address
The token used for paying the transaction fee.
gasLimit
uint256
The gas limit for the bridge transaction.
execute
function execute(address to, uint256 value, bytes data) external payable virtual returns (bytes result)
Executes a transaction on behalf of the account.
Parameters
to
address
The target address for the transaction.
value
uint256
The value to be sent with the transaction.
data
bytes
The data payload for the transaction.
Return Values
result
bytes
The result of the transaction.
Last updated