Interface.ierc20custody
IERC20Custody
Git Source (opens in a new tab)
Inherits: IERC20CustodyEvents, IERC20CustodyErrors
Functions
whitelisted
Mapping of whitelisted tokens => true/false.
function whitelisted(address token) external view returns (bool);
withdraw
Withdraw directly transfers the tokens to the destination address without contract call.
This function can only be called by the TSS address.
function withdraw(address token, address to, uint256 amount) external;
Parameters
Name | Type | Description |
---|---|---|
token | address | Address of the ERC20 token. |
to | address | Destination address for the tokens. |
amount | uint256 | Amount of tokens to withdraw. |
withdrawAndCall
WithdrawAndCall transfers tokens to Gateway and call a contract through the Gateway.
This function can only be called by the TSS address.
function withdrawAndCall(address token, address to, uint256 amount, bytes calldata data) external;
Parameters
Name | Type | Description |
---|---|---|
token | address | Address of the ERC20 token. |
to | address | Address of the contract to call. |
amount | uint256 | Amount of tokens to withdraw. |
data | bytes | Calldata to pass to the contract call. |
withdrawAndRevert
WithdrawAndRevert transfers tokens to Gateway and call a contract with a revert functionality through the Gateway.
This function can only be called by the TSS address.
function withdrawAndRevert(
address token,
address to,
uint256 amount,
bytes calldata data,
RevertContext calldata revertContext
)
external;
Parameters
Name | Type | Description |
---|---|---|
token | address | Address of the ERC20 token. |
to | address | Address of the contract to call. |
amount | uint256 | Amount of tokens to withdraw. |
data | bytes | Calldata to pass to the contract call. |
revertContext | RevertContext | Revert context to pass to onRevert. |
Continue Learning
Continue with the next part or try a related tutorial
How has your developer experience been?
Share your feedback and help improve it for everyone.