IPaymentCallback
Inherits: IERC165
This interface can be implemented by contracts that wish to transfer tokens during initiate actions.
The contract must implement the ERC-165 interface detection mechanism.
Functions
transferCallback
Triggered by the USDN protocol to transfer asset tokens during initiate
actions.
Implementations must ensure that the msg.sender
is the USDN protocol for security purposes.
function transferCallback(IERC20Metadata token, uint256 amount, address to) external;
Parameters
Name | Type | Description |
---|---|---|
token | IERC20Metadata | The address of the ERC20 token to be transferred. |
amount | uint256 | The amount of tokens to transfer. |
to | address | The recipient's address. |
usdnTransferCallback
Triggered by the USDN protocol during the initiateWithdrawal process to transfer USDN shares.
Implementations must verify that the msg.sender
is the USDN protocol.
function usdnTransferCallback(IUsdn usdn, uint256 shares) external;
Parameters
Name | Type | Description |
---|---|---|
usdn | IUsdn | The address of the USDN protocol. |
shares | uint256 | The number of USDN shares to transfer to the protocol (msg.sender ). |