IERC7540Redeem
Functions
requestRedeem
*Assumes control of shares from sender into the Vault and submits a Request for asynchronous redeem.
- MUST support a redeem Request flow where the control of shares is taken from sender directly where msg.sender has ERC-20 approval over the shares of owner.
- MUST revert if all of shares cannot be requested for redeem.*
function requestRedeem(uint256 shares, address controller, address owner) external returns (uint256 requestId);
Parameters
Name | Type | Description |
---|---|---|
shares | uint256 | the amount of shares to be redeemed to transfer from owner |
controller | address | the controller of the request who will be able to operate the request |
owner | address | the source of the shares to be redeemed NOTE: most implementations will require pre-approval of the Vault with the Vault's share token. |
pendingRedeemRequest
*Returns the amount of requested shares in Pending state.
- MUST NOT include any shares in Claimable state for redeem or withdraw.
- MUST NOT show any variations depending on the caller.
- MUST NOT revert unless due to integer overflow caused by an unreasonably large input.*
function pendingRedeemRequest(uint256 requestId, address controller) external view returns (uint256 pendingShares);
claimableRedeemRequest
*Returns the amount of requested shares in Claimable state for the controller to redeem or withdraw.
- MUST NOT include any shares in Pending state for redeem or withdraw.
- MUST NOT show any variations depending on the caller.
- MUST NOT revert unless due to integer overflow caused by an unreasonably large input.*
function claimableRedeemRequest(
uint256 requestId,
address controller
)
external
view
returns (uint256 claimableShares);
Events
RedeemRequest
event RedeemRequest(
address indexed controller, address indexed owner, uint256 indexed requestId, address sender, uint256 assets
);