123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962 |
- :github-icon: pass:[<svg class="icon"><use href="#github-icon"/></svg>]
- :IERC20: pass:normal[xref:token/ERC20.adoc#IERC20[`IERC20`]]
- :IERC20Metadata: pass:normal[xref:token/ERC20.adoc#IERC20Metadata[`IERC20Metadata`]]
- :IERC165: pass:normal[xref:utils.adoc#IERC165[`IERC165`]]
- :IERC721: pass:normal[xref:token/ERC721.adoc#IERC721[`IERC721`]]
- :IERC721Receiver: pass:normal[xref:token/ERC721.adoc#IERC721Receiver[`IERC721Receiver`]]
- :IERC721Enumerable: pass:normal[xref:token/ERC721.adoc#IERC721Enumerable[`IERC721Enumerable`]]
- :IERC721Metadata: pass:normal[xref:token/ERC721.adoc#IERC721Metadata[`IERC721Metadata`]]
- :IERC777: pass:normal[xref:token/ERC777.adoc#IERC777[`IERC777`]]
- :IERC777Recipient: pass:normal[xref:token/ERC777.adoc#IERC777Recipient[`IERC777Recipient`]]
- :IERC777Sender: pass:normal[xref:token/ERC777.adoc#IERC777Sender[`IERC777Sender`]]
- :IERC1155: pass:normal[xref:token/ERC1155.adoc#IERC1155[`IERC1155`]]
- :IERC1155Receiver: pass:normal[xref:token/ERC1155.adoc#IERC1155Receiver[`IERC1155Receiver`]]
- :IERC1155MetadataURI: pass:normal[xref:token/ERC1155.adoc#IERC1155MetadataURI[`IERC1155MetadataURI`]]
- :IERC1271: pass:normal[xref:interfaces.adoc#IERC1271[`IERC1271`]]
- :IERC1363: pass:normal[xref:interfaces.adoc#IERC1363[`IERC1363`]]
- :IERC1363Receiver: pass:normal[xref:interfaces.adoc#IERC1363Receiver[`IERC1363Receiver`]]
- :IERC1363Spender: pass:normal[xref:interfaces.adoc#IERC1363Spender[`IERC1363Spender`]]
- :IERC1820Implementer: pass:normal[xref:utils.adoc#IERC1820Implementer[`IERC1820Implementer`]]
- :IERC1820Registry: pass:normal[xref:utils.adoc#IERC1820Registry[`IERC1820Registry`]]
- :IERC1822Proxiable: pass:normal[xref:interfaces.adoc#IERC1822Proxiable[`IERC1822Proxiable`]]
- :IERC2612: pass:normal[xref:interfaces.adoc#IERC2612[`IERC2612`]]
- :IERC2981: pass:normal[xref:interfaces.adoc#IERC2981[`IERC2981`]]
- :IERC3156FlashLender: pass:normal[xref:interfaces.adoc#IERC3156FlashLender[`IERC3156FlashLender`]]
- :IERC3156FlashBorrower: pass:normal[xref:interfaces.adoc#IERC3156FlashBorrower[`IERC3156FlashBorrower`]]
- :IERC4626: pass:normal[xref:interfaces.adoc#IERC4626[`IERC4626`]]
- :IERC4906: pass:normal[xref:interfaces.adoc#IERC4906[`IERC4906`]]
- :IERC5267: pass:normal[xref:interfaces.adoc#IERC5267[`IERC5267`]]
- :IERC5313: pass:normal[xref:interfaces.adoc#IERC5313[`IERC5313`]]
- :IERC5805: pass:normal[xref:interfaces.adoc#IERC5805[`IERC5805`]]
- :IERC6372: pass:normal[xref:interfaces.adoc#IERC6372[`IERC6372`]]
- :xref-IERC1271-isValidSignature-bytes32-bytes-: xref:interfaces.adoc#IERC1271-isValidSignature-bytes32-bytes-
- :xref-IERC1363-transferAndCall-address-uint256-: xref:interfaces.adoc#IERC1363-transferAndCall-address-uint256-
- :xref-IERC1363-transferAndCall-address-uint256-bytes-: xref:interfaces.adoc#IERC1363-transferAndCall-address-uint256-bytes-
- :xref-IERC1363-transferFromAndCall-address-address-uint256-: xref:interfaces.adoc#IERC1363-transferFromAndCall-address-address-uint256-
- :xref-IERC1363-transferFromAndCall-address-address-uint256-bytes-: xref:interfaces.adoc#IERC1363-transferFromAndCall-address-address-uint256-bytes-
- :xref-IERC1363-approveAndCall-address-uint256-: xref:interfaces.adoc#IERC1363-approveAndCall-address-uint256-
- :xref-IERC1363-approveAndCall-address-uint256-bytes-: xref:interfaces.adoc#IERC1363-approveAndCall-address-uint256-bytes-
- :xref-IERC20-totalSupply--: xref:token/ERC20.adoc#IERC20-totalSupply--
- :xref-IERC20-balanceOf-address-: xref:token/ERC20.adoc#IERC20-balanceOf-address-
- :xref-IERC20-transfer-address-uint256-: xref:token/ERC20.adoc#IERC20-transfer-address-uint256-
- :xref-IERC20-allowance-address-address-: xref:token/ERC20.adoc#IERC20-allowance-address-address-
- :xref-IERC20-approve-address-uint256-: xref:token/ERC20.adoc#IERC20-approve-address-uint256-
- :xref-IERC20-transferFrom-address-address-uint256-: xref:token/ERC20.adoc#IERC20-transferFrom-address-address-uint256-
- :xref-IERC165-supportsInterface-bytes4-: xref:utils.adoc#IERC165-supportsInterface-bytes4-
- :xref-IERC20-Transfer-address-address-uint256-: xref:token/ERC20.adoc#IERC20-Transfer-address-address-uint256-
- :xref-IERC20-Approval-address-address-uint256-: xref:token/ERC20.adoc#IERC20-Approval-address-address-uint256-
- :IERC1363-transferAndCall: pass:normal[xref:interfaces.adoc#IERC1363-transferAndCall-address-uint256-bytes-[`IERC1363.transferAndCall`]]
- :IERC1363-transferFromAndCall: pass:normal[xref:interfaces.adoc#IERC1363-transferFromAndCall-address-address-uint256-bytes-[`IERC1363.transferFromAndCall`]]
- :xref-IERC1363Receiver-onTransferReceived-address-address-uint256-bytes-: xref:interfaces.adoc#IERC1363Receiver-onTransferReceived-address-address-uint256-bytes-
- :IERC1363-approveAndCall: pass:normal[xref:interfaces.adoc#IERC1363-approveAndCall-address-uint256-bytes-[`IERC1363.approveAndCall`]]
- :xref-IERC1363Spender-onApprovalReceived-address-uint256-bytes-: xref:interfaces.adoc#IERC1363Spender-onApprovalReceived-address-uint256-bytes-
- :xref-IERC1822Proxiable-proxiableUUID--: xref:interfaces.adoc#IERC1822Proxiable-proxiableUUID--
- :xref-IERC20Permit-permit-address-address-uint256-uint256-uint8-bytes32-bytes32-: xref:token/ERC20.adoc#IERC20Permit-permit-address-address-uint256-uint256-uint8-bytes32-bytes32-
- :xref-IERC20Permit-nonces-address-: xref:token/ERC20.adoc#IERC20Permit-nonces-address-
- :xref-IERC20Permit-DOMAIN_SEPARATOR--: xref:token/ERC20.adoc#IERC20Permit-DOMAIN_SEPARATOR--
- :xref-IERC2981-royaltyInfo-uint256-uint256-: xref:interfaces.adoc#IERC2981-royaltyInfo-uint256-uint256-
- :xref-IERC165-supportsInterface-bytes4-: xref:utils.adoc#IERC165-supportsInterface-bytes4-
- :xref-IERC3156FlashLender-maxFlashLoan-address-: xref:interfaces.adoc#IERC3156FlashLender-maxFlashLoan-address-
- :xref-IERC3156FlashLender-flashFee-address-uint256-: xref:interfaces.adoc#IERC3156FlashLender-flashFee-address-uint256-
- :xref-IERC3156FlashLender-flashLoan-contract-IERC3156FlashBorrower-address-uint256-bytes-: xref:interfaces.adoc#IERC3156FlashLender-flashLoan-contract-IERC3156FlashBorrower-address-uint256-bytes-
- :xref-IERC3156FlashBorrower-onFlashLoan-address-address-uint256-uint256-bytes-: xref:interfaces.adoc#IERC3156FlashBorrower-onFlashLoan-address-address-uint256-uint256-bytes-
- :xref-IERC4626-asset--: xref:interfaces.adoc#IERC4626-asset--
- :xref-IERC4626-totalAssets--: xref:interfaces.adoc#IERC4626-totalAssets--
- :xref-IERC4626-convertToShares-uint256-: xref:interfaces.adoc#IERC4626-convertToShares-uint256-
- :xref-IERC4626-convertToAssets-uint256-: xref:interfaces.adoc#IERC4626-convertToAssets-uint256-
- :xref-IERC4626-maxDeposit-address-: xref:interfaces.adoc#IERC4626-maxDeposit-address-
- :xref-IERC4626-previewDeposit-uint256-: xref:interfaces.adoc#IERC4626-previewDeposit-uint256-
- :xref-IERC4626-deposit-uint256-address-: xref:interfaces.adoc#IERC4626-deposit-uint256-address-
- :xref-IERC4626-maxMint-address-: xref:interfaces.adoc#IERC4626-maxMint-address-
- :xref-IERC4626-previewMint-uint256-: xref:interfaces.adoc#IERC4626-previewMint-uint256-
- :xref-IERC4626-mint-uint256-address-: xref:interfaces.adoc#IERC4626-mint-uint256-address-
- :xref-IERC4626-maxWithdraw-address-: xref:interfaces.adoc#IERC4626-maxWithdraw-address-
- :xref-IERC4626-previewWithdraw-uint256-: xref:interfaces.adoc#IERC4626-previewWithdraw-uint256-
- :xref-IERC4626-withdraw-uint256-address-address-: xref:interfaces.adoc#IERC4626-withdraw-uint256-address-address-
- :xref-IERC4626-maxRedeem-address-: xref:interfaces.adoc#IERC4626-maxRedeem-address-
- :xref-IERC4626-previewRedeem-uint256-: xref:interfaces.adoc#IERC4626-previewRedeem-uint256-
- :xref-IERC4626-redeem-uint256-address-address-: xref:interfaces.adoc#IERC4626-redeem-uint256-address-address-
- :xref-IERC20Metadata-name--: xref:token/ERC20.adoc#IERC20Metadata-name--
- :xref-IERC20Metadata-symbol--: xref:token/ERC20.adoc#IERC20Metadata-symbol--
- :xref-IERC20Metadata-decimals--: xref:token/ERC20.adoc#IERC20Metadata-decimals--
- :xref-IERC20-totalSupply--: xref:token/ERC20.adoc#IERC20-totalSupply--
- :xref-IERC20-balanceOf-address-: xref:token/ERC20.adoc#IERC20-balanceOf-address-
- :xref-IERC20-transfer-address-uint256-: xref:token/ERC20.adoc#IERC20-transfer-address-uint256-
- :xref-IERC20-allowance-address-address-: xref:token/ERC20.adoc#IERC20-allowance-address-address-
- :xref-IERC20-approve-address-uint256-: xref:token/ERC20.adoc#IERC20-approve-address-uint256-
- :xref-IERC20-transferFrom-address-address-uint256-: xref:token/ERC20.adoc#IERC20-transferFrom-address-address-uint256-
- :xref-IERC4626-Deposit-address-address-uint256-uint256-: xref:interfaces.adoc#IERC4626-Deposit-address-address-uint256-uint256-
- :xref-IERC4626-Withdraw-address-address-address-uint256-uint256-: xref:interfaces.adoc#IERC4626-Withdraw-address-address-address-uint256-uint256-
- :xref-IERC20-Transfer-address-address-uint256-: xref:token/ERC20.adoc#IERC20-Transfer-address-address-uint256-
- :xref-IERC20-Approval-address-address-uint256-: xref:token/ERC20.adoc#IERC20-Approval-address-address-uint256-
- :xref-IERC5313-owner--: xref:interfaces.adoc#IERC5313-owner--
- :xref-IERC5267-eip712Domain--: xref:interfaces.adoc#IERC5267-eip712Domain--
- :xref-IERC5267-EIP712DomainChanged--: xref:interfaces.adoc#IERC5267-EIP712DomainChanged--
- :xref-IVotes-getVotes-address-: xref:governance.adoc#IVotes-getVotes-address-
- :xref-IVotes-getPastVotes-address-uint256-: xref:governance.adoc#IVotes-getPastVotes-address-uint256-
- :xref-IVotes-getPastTotalSupply-uint256-: xref:governance.adoc#IVotes-getPastTotalSupply-uint256-
- :xref-IVotes-delegates-address-: xref:governance.adoc#IVotes-delegates-address-
- :xref-IVotes-delegate-address-: xref:governance.adoc#IVotes-delegate-address-
- :xref-IVotes-delegateBySig-address-uint256-uint256-uint8-bytes32-bytes32-: xref:governance.adoc#IVotes-delegateBySig-address-uint256-uint256-uint8-bytes32-bytes32-
- :xref-IERC6372-clock--: xref:interfaces.adoc#IERC6372-clock--
- :xref-IERC6372-CLOCK_MODE--: xref:interfaces.adoc#IERC6372-CLOCK_MODE--
- :xref-IVotes-DelegateChanged-address-address-address-: xref:governance.adoc#IVotes-DelegateChanged-address-address-address-
- :xref-IVotes-DelegateVotesChanged-address-uint256-uint256-: xref:governance.adoc#IVotes-DelegateVotesChanged-address-uint256-uint256-
- :xref-IERC6372-clock--: xref:interfaces.adoc#IERC6372-clock--
- :xref-IERC6372-CLOCK_MODE--: xref:interfaces.adoc#IERC6372-CLOCK_MODE--
- = Interfaces
- [.readme-notice]
- NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/interfaces
- == List of standardized interfaces
- These interfaces are available as `.sol` files, and also as compiler `.json` ABI files (through the npm package). These
- are useful to interact with third party contracts that implement them.
- - {IERC20}
- - {IERC20Metadata}
- - {IERC165}
- - {IERC721}
- - {IERC721Receiver}
- - {IERC721Enumerable}
- - {IERC721Metadata}
- - {IERC777}
- - {IERC777Recipient}
- - {IERC777Sender}
- - {IERC1155}
- - {IERC1155Receiver}
- - {IERC1155MetadataURI}
- - {IERC1271}
- - {IERC1363}
- - {IERC1363Receiver}
- - {IERC1363Spender}
- - {IERC1820Implementer}
- - {IERC1820Registry}
- - {IERC1822Proxiable}
- - {IERC2612}
- - {IERC2981}
- - {IERC3156FlashLender}
- - {IERC3156FlashBorrower}
- - {IERC4626}
- - {IERC4906}
- - {IERC5267}
- - {IERC5313}
- - {IERC5805}
- - {IERC6372}
- == Detailed ABI
- :isValidSignature: pass:normal[xref:#IERC1271-isValidSignature-bytes32-bytes-[`++isValidSignature++`]]
- [.contract]
- [[IERC1271]]
- === `++IERC1271++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC1271.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC1271.sol";
- ```
- Interface of the ERC1271 standard signature validation method for
- contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
- _Available since v4.1._
- [.contract-index]
- .Functions
- --
- * {xref-IERC1271-isValidSignature-bytes32-bytes-}[`++isValidSignature(hash, signature)++`]
- --
- [.contract-item]
- [[IERC1271-isValidSignature-bytes32-bytes-]]
- ==== `[.contract-item-name]#++isValidSignature++#++(bytes32 hash, bytes signature) → bytes4 magicValue++` [.item-kind]#external#
- Should return whether the signature provided is valid for the provided data
- :transferAndCall: pass:normal[xref:#IERC1363-transferAndCall-address-uint256-[`++transferAndCall++`]]
- :transferAndCall: pass:normal[xref:#IERC1363-transferAndCall-address-uint256-bytes-[`++transferAndCall++`]]
- :transferFromAndCall: pass:normal[xref:#IERC1363-transferFromAndCall-address-address-uint256-[`++transferFromAndCall++`]]
- :transferFromAndCall: pass:normal[xref:#IERC1363-transferFromAndCall-address-address-uint256-bytes-[`++transferFromAndCall++`]]
- :approveAndCall: pass:normal[xref:#IERC1363-approveAndCall-address-uint256-[`++approveAndCall++`]]
- :approveAndCall: pass:normal[xref:#IERC1363-approveAndCall-address-uint256-bytes-[`++approveAndCall++`]]
- [.contract]
- [[IERC1363]]
- === `++IERC1363++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC1363.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC1363.sol";
- ```
- Interface of an ERC1363 compliant contract, as defined in the
- https://eips.ethereum.org/EIPS/eip-1363[EIP].
- Defines a interface for ERC20 tokens that supports executing recipient
- code after `transfer` or `transferFrom`, or spender code after `approve`.
- [.contract-index]
- .Functions
- --
- * {xref-IERC1363-transferAndCall-address-uint256-}[`++transferAndCall(to, amount)++`]
- * {xref-IERC1363-transferAndCall-address-uint256-bytes-}[`++transferAndCall(to, amount, data)++`]
- * {xref-IERC1363-transferFromAndCall-address-address-uint256-}[`++transferFromAndCall(from, to, amount)++`]
- * {xref-IERC1363-transferFromAndCall-address-address-uint256-bytes-}[`++transferFromAndCall(from, to, amount, data)++`]
- * {xref-IERC1363-approveAndCall-address-uint256-}[`++approveAndCall(spender, amount)++`]
- * {xref-IERC1363-approveAndCall-address-uint256-bytes-}[`++approveAndCall(spender, amount, data)++`]
- [.contract-subindex-inherited]
- .IERC20
- * {xref-IERC20-totalSupply--}[`++totalSupply()++`]
- * {xref-IERC20-balanceOf-address-}[`++balanceOf(account)++`]
- * {xref-IERC20-transfer-address-uint256-}[`++transfer(to, amount)++`]
- * {xref-IERC20-allowance-address-address-}[`++allowance(owner, spender)++`]
- * {xref-IERC20-approve-address-uint256-}[`++approve(spender, amount)++`]
- * {xref-IERC20-transferFrom-address-address-uint256-}[`++transferFrom(from, to, amount)++`]
- [.contract-subindex-inherited]
- .IERC165
- * {xref-IERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
- --
- [.contract-index]
- .Events
- --
- [.contract-subindex-inherited]
- .IERC20
- * {xref-IERC20-Transfer-address-address-uint256-}[`++Transfer(from, to, value)++`]
- * {xref-IERC20-Approval-address-address-uint256-}[`++Approval(owner, spender, value)++`]
- [.contract-subindex-inherited]
- .IERC165
- --
- [.contract-item]
- [[IERC1363-transferAndCall-address-uint256-]]
- ==== `[.contract-item-name]#++transferAndCall++#++(address to, uint256 amount) → bool++` [.item-kind]#external#
- Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
- [.contract-item]
- [[IERC1363-transferAndCall-address-uint256-bytes-]]
- ==== `[.contract-item-name]#++transferAndCall++#++(address to, uint256 amount, bytes data) → bool++` [.item-kind]#external#
- Transfer tokens from `msg.sender` to another address and then call `onTransferReceived` on receiver
- [.contract-item]
- [[IERC1363-transferFromAndCall-address-address-uint256-]]
- ==== `[.contract-item-name]#++transferFromAndCall++#++(address from, address to, uint256 amount) → bool++` [.item-kind]#external#
- Transfer tokens from one address to another and then call `onTransferReceived` on receiver
- [.contract-item]
- [[IERC1363-transferFromAndCall-address-address-uint256-bytes-]]
- ==== `[.contract-item-name]#++transferFromAndCall++#++(address from, address to, uint256 amount, bytes data) → bool++` [.item-kind]#external#
- Transfer tokens from one address to another and then call `onTransferReceived` on receiver
- [.contract-item]
- [[IERC1363-approveAndCall-address-uint256-]]
- ==== `[.contract-item-name]#++approveAndCall++#++(address spender, uint256 amount) → bool++` [.item-kind]#external#
- Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
- and then call `onApprovalReceived` on spender.
- [.contract-item]
- [[IERC1363-approveAndCall-address-uint256-bytes-]]
- ==== `[.contract-item-name]#++approveAndCall++#++(address spender, uint256 amount, bytes data) → bool++` [.item-kind]#external#
- Approve the passed address to spend the specified amount of tokens on behalf of msg.sender
- and then call `onApprovalReceived` on spender.
- :onTransferReceived: pass:normal[xref:#IERC1363Receiver-onTransferReceived-address-address-uint256-bytes-[`++onTransferReceived++`]]
- [.contract]
- [[IERC1363Receiver]]
- === `++IERC1363Receiver++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC1363Receiver.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC1363Receiver.sol";
- ```
- Interface for any contract that wants to support {IERC1363-transferAndCall}
- or {IERC1363-transferFromAndCall} from {ERC1363} token contracts.
- [.contract-index]
- .Functions
- --
- * {xref-IERC1363Receiver-onTransferReceived-address-address-uint256-bytes-}[`++onTransferReceived(operator, from, amount, data)++`]
- --
- [.contract-item]
- [[IERC1363Receiver-onTransferReceived-address-address-uint256-bytes-]]
- ==== `[.contract-item-name]#++onTransferReceived++#++(address operator, address from, uint256 amount, bytes data) → bytes4++` [.item-kind]#external#
- Any ERC1363 smart contract calls this function on the recipient
- after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the
- transfer. Return of other than the magic value MUST result in the
- transaction being reverted.
- Note: the token contract address is always the message sender.
- :onApprovalReceived: pass:normal[xref:#IERC1363Spender-onApprovalReceived-address-uint256-bytes-[`++onApprovalReceived++`]]
- [.contract]
- [[IERC1363Spender]]
- === `++IERC1363Spender++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC1363Spender.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC1363Spender.sol";
- ```
- Interface for any contract that wants to support {IERC1363-approveAndCall}
- from {ERC1363} token contracts.
- [.contract-index]
- .Functions
- --
- * {xref-IERC1363Spender-onApprovalReceived-address-uint256-bytes-}[`++onApprovalReceived(owner, amount, data)++`]
- --
- [.contract-item]
- [[IERC1363Spender-onApprovalReceived-address-uint256-bytes-]]
- ==== `[.contract-item-name]#++onApprovalReceived++#++(address owner, uint256 amount, bytes data) → bytes4++` [.item-kind]#external#
- Any ERC1363 smart contract calls this function on the recipient
- after an `approve`. This function MAY throw to revert and reject the
- approval. Return of other than the magic value MUST result in the
- transaction being reverted.
- Note: the token contract address is always the message sender.
- :proxiableUUID: pass:normal[xref:#IERC1822Proxiable-proxiableUUID--[`++proxiableUUID++`]]
- [.contract]
- [[IERC1822Proxiable]]
- === `++IERC1822Proxiable++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/draft-IERC1822.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
- ```
- ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
- proxy whose upgrades are fully controlled by the current implementation.
- [.contract-index]
- .Functions
- --
- * {xref-IERC1822Proxiable-proxiableUUID--}[`++proxiableUUID()++`]
- --
- [.contract-item]
- [[IERC1822Proxiable-proxiableUUID--]]
- ==== `[.contract-item-name]#++proxiableUUID++#++() → bytes32++` [.item-kind]#external#
- Returns the storage slot that the proxiable contract assumes is being used to store the implementation
- address.
- IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
- bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
- function revert if invoked through a proxy.
- [.contract]
- [[IERC2612]]
- === `++IERC2612++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC2612.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC2612.sol";
- ```
- [.contract-index]
- .Functions
- --
- [.contract-subindex-inherited]
- .IERC20Permit
- * {xref-IERC20Permit-permit-address-address-uint256-uint256-uint8-bytes32-bytes32-}[`++permit(owner, spender, value, deadline, v, r, s)++`]
- * {xref-IERC20Permit-nonces-address-}[`++nonces(owner)++`]
- * {xref-IERC20Permit-DOMAIN_SEPARATOR--}[`++DOMAIN_SEPARATOR()++`]
- --
- :royaltyInfo: pass:normal[xref:#IERC2981-royaltyInfo-uint256-uint256-[`++royaltyInfo++`]]
- [.contract]
- [[IERC2981]]
- === `++IERC2981++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC2981.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC2981.sol";
- ```
- Interface for the NFT Royalty Standard.
- A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
- support for royalty payments across all NFT marketplaces and ecosystem participants.
- _Available since v4.5._
- [.contract-index]
- .Functions
- --
- * {xref-IERC2981-royaltyInfo-uint256-uint256-}[`++royaltyInfo(tokenId, salePrice)++`]
- [.contract-subindex-inherited]
- .IERC165
- * {xref-IERC165-supportsInterface-bytes4-}[`++supportsInterface(interfaceId)++`]
- --
- [.contract-item]
- [[IERC2981-royaltyInfo-uint256-uint256-]]
- ==== `[.contract-item-name]#++royaltyInfo++#++(uint256 tokenId, uint256 salePrice) → address receiver, uint256 royaltyAmount++` [.item-kind]#external#
- Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
- exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
- :maxFlashLoan: pass:normal[xref:#IERC3156FlashLender-maxFlashLoan-address-[`++maxFlashLoan++`]]
- :flashFee: pass:normal[xref:#IERC3156FlashLender-flashFee-address-uint256-[`++flashFee++`]]
- :flashLoan: pass:normal[xref:#IERC3156FlashLender-flashLoan-contract-IERC3156FlashBorrower-address-uint256-bytes-[`++flashLoan++`]]
- [.contract]
- [[IERC3156FlashLender]]
- === `++IERC3156FlashLender++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC3156FlashLender.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC3156FlashLender.sol";
- ```
- Interface of the ERC3156 FlashLender, as defined in
- https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].
- _Available since v4.1._
- [.contract-index]
- .Functions
- --
- * {xref-IERC3156FlashLender-maxFlashLoan-address-}[`++maxFlashLoan(token)++`]
- * {xref-IERC3156FlashLender-flashFee-address-uint256-}[`++flashFee(token, amount)++`]
- * {xref-IERC3156FlashLender-flashLoan-contract-IERC3156FlashBorrower-address-uint256-bytes-}[`++flashLoan(receiver, token, amount, data)++`]
- --
- [.contract-item]
- [[IERC3156FlashLender-maxFlashLoan-address-]]
- ==== `[.contract-item-name]#++maxFlashLoan++#++(address token) → uint256++` [.item-kind]#external#
- The amount of currency available to be lended.
- [.contract-item]
- [[IERC3156FlashLender-flashFee-address-uint256-]]
- ==== `[.contract-item-name]#++flashFee++#++(address token, uint256 amount) → uint256++` [.item-kind]#external#
- The fee to be charged for a given loan.
- [.contract-item]
- [[IERC3156FlashLender-flashLoan-contract-IERC3156FlashBorrower-address-uint256-bytes-]]
- ==== `[.contract-item-name]#++flashLoan++#++(contract IERC3156FlashBorrower receiver, address token, uint256 amount, bytes data) → bool++` [.item-kind]#external#
- Initiate a flash loan.
- :onFlashLoan: pass:normal[xref:#IERC3156FlashBorrower-onFlashLoan-address-address-uint256-uint256-bytes-[`++onFlashLoan++`]]
- [.contract]
- [[IERC3156FlashBorrower]]
- === `++IERC3156FlashBorrower++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC3156FlashBorrower.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC3156FlashBorrower.sol";
- ```
- Interface of the ERC3156 FlashBorrower, as defined in
- https://eips.ethereum.org/EIPS/eip-3156[ERC-3156].
- _Available since v4.1._
- [.contract-index]
- .Functions
- --
- * {xref-IERC3156FlashBorrower-onFlashLoan-address-address-uint256-uint256-bytes-}[`++onFlashLoan(initiator, token, amount, fee, data)++`]
- --
- [.contract-item]
- [[IERC3156FlashBorrower-onFlashLoan-address-address-uint256-uint256-bytes-]]
- ==== `[.contract-item-name]#++onFlashLoan++#++(address initiator, address token, uint256 amount, uint256 fee, bytes data) → bytes32++` [.item-kind]#external#
- Receive a flash loan.
- :Deposit: pass:normal[xref:#IERC4626-Deposit-address-address-uint256-uint256-[`++Deposit++`]]
- :Withdraw: pass:normal[xref:#IERC4626-Withdraw-address-address-address-uint256-uint256-[`++Withdraw++`]]
- :asset: pass:normal[xref:#IERC4626-asset--[`++asset++`]]
- :totalAssets: pass:normal[xref:#IERC4626-totalAssets--[`++totalAssets++`]]
- :convertToShares: pass:normal[xref:#IERC4626-convertToShares-uint256-[`++convertToShares++`]]
- :convertToAssets: pass:normal[xref:#IERC4626-convertToAssets-uint256-[`++convertToAssets++`]]
- :maxDeposit: pass:normal[xref:#IERC4626-maxDeposit-address-[`++maxDeposit++`]]
- :previewDeposit: pass:normal[xref:#IERC4626-previewDeposit-uint256-[`++previewDeposit++`]]
- :deposit: pass:normal[xref:#IERC4626-deposit-uint256-address-[`++deposit++`]]
- :maxMint: pass:normal[xref:#IERC4626-maxMint-address-[`++maxMint++`]]
- :previewMint: pass:normal[xref:#IERC4626-previewMint-uint256-[`++previewMint++`]]
- :mint: pass:normal[xref:#IERC4626-mint-uint256-address-[`++mint++`]]
- :maxWithdraw: pass:normal[xref:#IERC4626-maxWithdraw-address-[`++maxWithdraw++`]]
- :previewWithdraw: pass:normal[xref:#IERC4626-previewWithdraw-uint256-[`++previewWithdraw++`]]
- :withdraw: pass:normal[xref:#IERC4626-withdraw-uint256-address-address-[`++withdraw++`]]
- :maxRedeem: pass:normal[xref:#IERC4626-maxRedeem-address-[`++maxRedeem++`]]
- :previewRedeem: pass:normal[xref:#IERC4626-previewRedeem-uint256-[`++previewRedeem++`]]
- :redeem: pass:normal[xref:#IERC4626-redeem-uint256-address-address-[`++redeem++`]]
- [.contract]
- [[IERC4626]]
- === `++IERC4626++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC4626.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC4626.sol";
- ```
- Interface of the ERC4626 "Tokenized Vault Standard", as defined in
- https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
- _Available since v4.7._
- [.contract-index]
- .Functions
- --
- * {xref-IERC4626-asset--}[`++asset()++`]
- * {xref-IERC4626-totalAssets--}[`++totalAssets()++`]
- * {xref-IERC4626-convertToShares-uint256-}[`++convertToShares(assets)++`]
- * {xref-IERC4626-convertToAssets-uint256-}[`++convertToAssets(shares)++`]
- * {xref-IERC4626-maxDeposit-address-}[`++maxDeposit(receiver)++`]
- * {xref-IERC4626-previewDeposit-uint256-}[`++previewDeposit(assets)++`]
- * {xref-IERC4626-deposit-uint256-address-}[`++deposit(assets, receiver)++`]
- * {xref-IERC4626-maxMint-address-}[`++maxMint(receiver)++`]
- * {xref-IERC4626-previewMint-uint256-}[`++previewMint(shares)++`]
- * {xref-IERC4626-mint-uint256-address-}[`++mint(shares, receiver)++`]
- * {xref-IERC4626-maxWithdraw-address-}[`++maxWithdraw(owner)++`]
- * {xref-IERC4626-previewWithdraw-uint256-}[`++previewWithdraw(assets)++`]
- * {xref-IERC4626-withdraw-uint256-address-address-}[`++withdraw(assets, receiver, owner)++`]
- * {xref-IERC4626-maxRedeem-address-}[`++maxRedeem(owner)++`]
- * {xref-IERC4626-previewRedeem-uint256-}[`++previewRedeem(shares)++`]
- * {xref-IERC4626-redeem-uint256-address-address-}[`++redeem(shares, receiver, owner)++`]
- [.contract-subindex-inherited]
- .IERC20Metadata
- * {xref-IERC20Metadata-name--}[`++name()++`]
- * {xref-IERC20Metadata-symbol--}[`++symbol()++`]
- * {xref-IERC20Metadata-decimals--}[`++decimals()++`]
- [.contract-subindex-inherited]
- .IERC20
- * {xref-IERC20-totalSupply--}[`++totalSupply()++`]
- * {xref-IERC20-balanceOf-address-}[`++balanceOf(account)++`]
- * {xref-IERC20-transfer-address-uint256-}[`++transfer(to, amount)++`]
- * {xref-IERC20-allowance-address-address-}[`++allowance(owner, spender)++`]
- * {xref-IERC20-approve-address-uint256-}[`++approve(spender, amount)++`]
- * {xref-IERC20-transferFrom-address-address-uint256-}[`++transferFrom(from, to, amount)++`]
- --
- [.contract-index]
- .Events
- --
- * {xref-IERC4626-Deposit-address-address-uint256-uint256-}[`++Deposit(sender, owner, assets, shares)++`]
- * {xref-IERC4626-Withdraw-address-address-address-uint256-uint256-}[`++Withdraw(sender, receiver, owner, assets, shares)++`]
- [.contract-subindex-inherited]
- .IERC20Metadata
- [.contract-subindex-inherited]
- .IERC20
- * {xref-IERC20-Transfer-address-address-uint256-}[`++Transfer(from, to, value)++`]
- * {xref-IERC20-Approval-address-address-uint256-}[`++Approval(owner, spender, value)++`]
- --
- [.contract-item]
- [[IERC4626-asset--]]
- ==== `[.contract-item-name]#++asset++#++() → address assetTokenAddress++` [.item-kind]#external#
- Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
- - MUST be an ERC-20 token contract.
- - MUST NOT revert.
- [.contract-item]
- [[IERC4626-totalAssets--]]
- ==== `[.contract-item-name]#++totalAssets++#++() → uint256 totalManagedAssets++` [.item-kind]#external#
- Returns the total amount of the underlying asset that is “managed” by Vault.
- - SHOULD include any compounding that occurs from yield.
- - MUST be inclusive of any fees that are charged against assets in the Vault.
- - MUST NOT revert.
- [.contract-item]
- [[IERC4626-convertToShares-uint256-]]
- ==== `[.contract-item-name]#++convertToShares++#++(uint256 assets) → uint256 shares++` [.item-kind]#external#
- Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
- scenario where all the conditions are met.
- - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
- - MUST NOT show any variations depending on the caller.
- - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
- - MUST NOT revert.
- NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
- “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
- from.
- [.contract-item]
- [[IERC4626-convertToAssets-uint256-]]
- ==== `[.contract-item-name]#++convertToAssets++#++(uint256 shares) → uint256 assets++` [.item-kind]#external#
- Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
- scenario where all the conditions are met.
- - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
- - MUST NOT show any variations depending on the caller.
- - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
- - MUST NOT revert.
- NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
- “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
- from.
- [.contract-item]
- [[IERC4626-maxDeposit-address-]]
- ==== `[.contract-item-name]#++maxDeposit++#++(address receiver) → uint256 maxAssets++` [.item-kind]#external#
- Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
- through a deposit call.
- - MUST return a limited value if receiver is subject to some deposit limit.
- - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
- - MUST NOT revert.
- [.contract-item]
- [[IERC4626-previewDeposit-uint256-]]
- ==== `[.contract-item-name]#++previewDeposit++#++(uint256 assets) → uint256 shares++` [.item-kind]#external#
- Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
- current on-chain conditions.
- - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
- call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
- in the same transaction.
- - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
- deposit would be accepted, regardless if the user has enough tokens approved, etc.
- - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
- - MUST NOT revert.
- NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
- share price or some other type of condition, meaning the depositor will lose assets by depositing.
- [.contract-item]
- [[IERC4626-deposit-uint256-address-]]
- ==== `[.contract-item-name]#++deposit++#++(uint256 assets, address receiver) → uint256 shares++` [.item-kind]#external#
- Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
- - MUST emit the Deposit event.
- - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
- deposit execution, and are accounted for during deposit.
- - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
- approving enough underlying tokens to the Vault contract, etc).
- NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
- [.contract-item]
- [[IERC4626-maxMint-address-]]
- ==== `[.contract-item-name]#++maxMint++#++(address receiver) → uint256 maxShares++` [.item-kind]#external#
- Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
- - MUST return a limited value if receiver is subject to some mint limit.
- - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
- - MUST NOT revert.
- [.contract-item]
- [[IERC4626-previewMint-uint256-]]
- ==== `[.contract-item-name]#++previewMint++#++(uint256 shares) → uint256 assets++` [.item-kind]#external#
- Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
- current on-chain conditions.
- - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
- in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
- same transaction.
- - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
- would be accepted, regardless if the user has enough tokens approved, etc.
- - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
- - MUST NOT revert.
- NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
- share price or some other type of condition, meaning the depositor will lose assets by minting.
- [.contract-item]
- [[IERC4626-mint-uint256-address-]]
- ==== `[.contract-item-name]#++mint++#++(uint256 shares, address receiver) → uint256 assets++` [.item-kind]#external#
- Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
- - MUST emit the Deposit event.
- - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
- execution, and are accounted for during mint.
- - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
- approving enough underlying tokens to the Vault contract, etc).
- NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
- [.contract-item]
- [[IERC4626-maxWithdraw-address-]]
- ==== `[.contract-item-name]#++maxWithdraw++#++(address owner) → uint256 maxAssets++` [.item-kind]#external#
- Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
- Vault, through a withdraw call.
- - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
- - MUST NOT revert.
- [.contract-item]
- [[IERC4626-previewWithdraw-uint256-]]
- ==== `[.contract-item-name]#++previewWithdraw++#++(uint256 assets) → uint256 shares++` [.item-kind]#external#
- Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
- given current on-chain conditions.
- - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
- call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
- called
- in the same transaction.
- - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
- the withdrawal would be accepted, regardless if the user has enough shares, etc.
- - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
- - MUST NOT revert.
- NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
- share price or some other type of condition, meaning the depositor will lose assets by depositing.
- [.contract-item]
- [[IERC4626-withdraw-uint256-address-address-]]
- ==== `[.contract-item-name]#++withdraw++#++(uint256 assets, address receiver, address owner) → uint256 shares++` [.item-kind]#external#
- Burns shares from owner and sends exactly assets of underlying tokens to receiver.
- - MUST emit the Withdraw event.
- - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
- withdraw execution, and are accounted for during withdraw.
- - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
- not having enough shares, etc).
- Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
- Those methods should be performed separately.
- [.contract-item]
- [[IERC4626-maxRedeem-address-]]
- ==== `[.contract-item-name]#++maxRedeem++#++(address owner) → uint256 maxShares++` [.item-kind]#external#
- Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
- through a redeem call.
- - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
- - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
- - MUST NOT revert.
- [.contract-item]
- [[IERC4626-previewRedeem-uint256-]]
- ==== `[.contract-item-name]#++previewRedeem++#++(uint256 shares) → uint256 assets++` [.item-kind]#external#
- Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
- given current on-chain conditions.
- - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
- in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
- same transaction.
- - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
- redemption would be accepted, regardless if the user has enough shares, etc.
- - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
- - MUST NOT revert.
- NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
- share price or some other type of condition, meaning the depositor will lose assets by redeeming.
- [.contract-item]
- [[IERC4626-redeem-uint256-address-address-]]
- ==== `[.contract-item-name]#++redeem++#++(uint256 shares, address receiver, address owner) → uint256 assets++` [.item-kind]#external#
- Burns exactly shares from owner and sends assets of underlying tokens to receiver.
- - MUST emit the Withdraw event.
- - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
- redeem execution, and are accounted for during redeem.
- - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
- not having enough shares, etc).
- NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
- Those methods should be performed separately.
- [.contract-item]
- [[IERC4626-Deposit-address-address-uint256-uint256-]]
- ==== `[.contract-item-name]#++Deposit++#++(address indexed sender, address indexed owner, uint256 assets, uint256 shares)++` [.item-kind]#event#
- [.contract-item]
- [[IERC4626-Withdraw-address-address-address-uint256-uint256-]]
- ==== `[.contract-item-name]#++Withdraw++#++(address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)++` [.item-kind]#event#
- :owner: pass:normal[xref:#IERC5313-owner--[`++owner++`]]
- [.contract]
- [[IERC5313]]
- === `++IERC5313++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC5313.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC5313.sol";
- ```
- Interface for the Light Contract Ownership Standard.
- A standardized minimal interface required to identify an account that controls a contract
- _Available since v4.9._
- [.contract-index]
- .Functions
- --
- * {xref-IERC5313-owner--}[`++owner()++`]
- --
- [.contract-item]
- [[IERC5313-owner--]]
- ==== `[.contract-item-name]#++owner++#++() → address++` [.item-kind]#external#
- Gets the address of the owner.
- :EIP712DomainChanged: pass:normal[xref:#IERC5267-EIP712DomainChanged--[`++EIP712DomainChanged++`]]
- :eip712Domain: pass:normal[xref:#IERC5267-eip712Domain--[`++eip712Domain++`]]
- [.contract]
- [[IERC5267]]
- === `++IERC5267++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC5267.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC5267.sol";
- ```
- [.contract-index]
- .Functions
- --
- * {xref-IERC5267-eip712Domain--}[`++eip712Domain()++`]
- --
- [.contract-index]
- .Events
- --
- * {xref-IERC5267-EIP712DomainChanged--}[`++EIP712DomainChanged()++`]
- --
- [.contract-item]
- [[IERC5267-eip712Domain--]]
- ==== `[.contract-item-name]#++eip712Domain++#++() → bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions++` [.item-kind]#external#
- returns the fields and values that describe the domain separator used by this contract for EIP-712
- signature.
- [.contract-item]
- [[IERC5267-EIP712DomainChanged--]]
- ==== `[.contract-item-name]#++EIP712DomainChanged++#++()++` [.item-kind]#event#
- MAY be emitted to signal that the domain could have changed.
- [.contract]
- [[IERC5805]]
- === `++IERC5805++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC5805.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC5805.sol";
- ```
- [.contract-index]
- .Functions
- --
- [.contract-subindex-inherited]
- .IVotes
- * {xref-IVotes-getVotes-address-}[`++getVotes(account)++`]
- * {xref-IVotes-getPastVotes-address-uint256-}[`++getPastVotes(account, timepoint)++`]
- * {xref-IVotes-getPastTotalSupply-uint256-}[`++getPastTotalSupply(timepoint)++`]
- * {xref-IVotes-delegates-address-}[`++delegates(account)++`]
- * {xref-IVotes-delegate-address-}[`++delegate(delegatee)++`]
- * {xref-IVotes-delegateBySig-address-uint256-uint256-uint8-bytes32-bytes32-}[`++delegateBySig(delegatee, nonce, expiry, v, r, s)++`]
- [.contract-subindex-inherited]
- .IERC6372
- * {xref-IERC6372-clock--}[`++clock()++`]
- * {xref-IERC6372-CLOCK_MODE--}[`++CLOCK_MODE()++`]
- --
- [.contract-index]
- .Events
- --
- [.contract-subindex-inherited]
- .IVotes
- * {xref-IVotes-DelegateChanged-address-address-address-}[`++DelegateChanged(delegator, fromDelegate, toDelegate)++`]
- * {xref-IVotes-DelegateVotesChanged-address-uint256-uint256-}[`++DelegateVotesChanged(delegate, previousBalance, newBalance)++`]
- [.contract-subindex-inherited]
- .IERC6372
- --
- :clock: pass:normal[xref:#IERC6372-clock--[`++clock++`]]
- :CLOCK_MODE: pass:normal[xref:#IERC6372-CLOCK_MODE--[`++CLOCK_MODE++`]]
- [.contract]
- [[IERC6372]]
- === `++IERC6372++` link:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/contracts/interfaces/IERC6372.sol[{github-icon},role=heading-link]
- [.hljs-theme-light.nopadding]
- ```solidity
- import "@openzeppelin/contracts/interfaces/IERC6372.sol";
- ```
- [.contract-index]
- .Functions
- --
- * {xref-IERC6372-clock--}[`++clock()++`]
- * {xref-IERC6372-CLOCK_MODE--}[`++CLOCK_MODE()++`]
- --
- [.contract-item]
- [[IERC6372-clock--]]
- ==== `[.contract-item-name]#++clock++#++() → uint48++` [.item-kind]#external#
- Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting).
- [.contract-item]
- [[IERC6372-CLOCK_MODE--]]
- ==== `[.contract-item-name]#++CLOCK_MODE++#++() → string++` [.item-kind]#external#
- Description of the clock
|