ZivoeDAO.sol
DAO -> Decentralized Autonomous Organization
Introduction
This contract escrows assets for the Zivoe protocol and is governed by TimelockController (effectively $ZVE Governance).
This contract has the following responsibilities:
Push assets (ERC20, ERC721, ERC1155) to a locker.
Pull assets (ERC20, ERC721, ERC1155) from a locker.
Enforce a whitelist of "lockers" (ZivoeLockers).
State Variables
Type | Name | Description |
---|---|---|
address | GBL | The ZivoeGlobals contract. |
Sections
push() - Pushes an ERC20 token from ZivoeDAO to locker.
pull() - Pulls ERC20 from locker to ZivoeDAO.
pullPartial() - Pulls specific amount of ERC20 from locker to ZivoeDAO.
pushMulti() - Pushes ERC20(s) from locker to ZivoeDAO.
pullMulti() - Pulls ERC20(s) from locker to ZivoeDAO.
pullMultiPartial() - Pulls specific amount(s) of ERC20(s) from locker to ZivoeDAO.
pushERC721() - Pushes an NFT from ZivoeDAO to locker.
pushMultiERC721() - Pushes NFT(s) from ZivoeDAO to locker.
pullERC721() - Pulls an NFT from locker to ZivoeDAO.
pushMultiERC721() - Pulls NFT(s) from locker to ZivoeDAO.
pushERC1155() - Pushes ERC1155 assets from ZivoeDAO to locker.
pullERC1155() - Pulls ERC1155 assets from locker to ZivoeDAO.
Write Functions
push()
push()
Pushes an ERC20 token from ZivoeDAO to locker.
Type | Name | Description |
---|---|---|
address | locker | The locker to push an ERC20 token to. |
address | asset | The ERC20 token to push. |
uint256 | amount | The amount of "asset" to push. |
bytes | data | Accompanying transaction data. |
Emits the Pushed() event
pull()
pull()
Pulls ERC20 from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to pull from. |
address | asset | The asset to pull. |
bytes | data | Accompanying transaction data. |
Emits the Pulled() event
pullPartial()
pullPartial()
Pulls specific amount of ERC20 from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to pull from. |
address | asset | The asset to pull. |
uint256 | amount | The amount to pull (may not refer to "asset", but rather a different asset within the locker). |
bytes | data | Accompanying transaction data. |
Emits the PulledPartial() event
pushMulti()
pushMulti()
Pushes ERC20(s) from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to push capital to. |
address[] | assets | The assets to push to locker. |
uint256[] | amounts | The amount of "asset" to push. |
bytes[] | data | Accompanying transaction data. |
Emits the Pushed() event (multiple times)
pullMulti()
pullMulti()
Pulls ERC20(s) from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to pull from. |
address[] | assets | The assets to pull. |
bytes[] | data | Accompanying transaction data. |
Emits the Pulled() event (multiple times)
pullMultiPartial()
pullMultiPartial()
Pulls specific amount(s) of ERC20(s) from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to pull from. |
address[] | assets | The asset(s) to pull. |
uint256[] | amounts | The amount(s) to pull (may not refer to "asset", rather a different asset within the locker). |
bytes[] | data | Accompanying transaction data. |
Emits the PulledPartial() event (multiple times)
pushERC721()
pushERC721()
Pushes an NFT from ZivoeDAO to locker.
Type | Name | Description |
---|---|---|
address | locker | The locker to push an NFT to. |
address | asset | The NFT contract. |
uint256 | tokenId | The NFT tokenId to push. |
bytes | data | Accompanying data for the transaction. |
Emits the PushedERC721()
pushMultiERC721()
pushMultiERC721()
Pushes NFT(s) from ZivoeDAO to locker.
Type | Name | Description |
---|---|---|
address | locker | The locker to push NFTs to. |
address[] | assets | The NFT contract(s). |
uint256[] | tokenIds | The NFT tokenId(s) to push. |
bytes[] | data | Accompanying data for the transaction(s). |
Emits the PushedERC721() event (multiple times)
pullERC721()
pullERC721()
Pulls an NFT from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to pull from. |
address | asset | The NFT contract. |
uint256 | amount | The NFT tokenId to pull. |
bytes | data | Accompanying data for the transaction. |
Emits the PulledERC721()
pullMultiERC721()
pullMultiERC721()
Pulls NFT(s) from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to pull from. |
address[] | assets | The NFT contract(s). |
uint256[] | tokenIds | The NFT tokenId(s) to pull. |
bytes[] | data | Accompanying data for the transaction(s). |
Emits the PulledERC721() event (multiple times)
pushERC1155()
pushERC1155()
Pushes ERC1155 assets from ZivoeDAO to locker.
Type | Name | Description |
---|---|---|
address | locker | The locker to push ERC1155 assets to. |
address | asset | The ERC1155 asset to push to locker. |
uint256[] | ids | The ids of "assets" to push. |
uint256[] | amounts | The amounts of "assets" to push. |
bytes | data | Accompanying data for the transaction. |
Emits the PushedERC1155() event
pullERC1155()
pullERC1155()
Pulls ERC1155 assets from locker to ZivoeDAO.
Type | Name | Description |
---|---|---|
address | locker | The locker to pull from. |
address | asset | The ERC1155 asset to pull. |
uint256[] | ids | The ids of "assets" to pull. |
uint256[] | amounts | The amounts of "assets" to pull. |
bytes | data | Accompanying data for the transaction. |
Emits the PulledERC1155() event
Events
Pushed()
Pushed()
Emitted during push() and pushMulti()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | locker | The locker receiving "asset". |
address | True | asset | The asset being pushed. |
uint256 | False | amount | The amount of "asset" being pushed. |
bytes | False | data | Accompanying transaction data. |
Pulled()
Pulled()
Emitted during pull() and pullMulti()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | locker | The locker "asset" is pulled from. |
address | True | asset | The asset being pulled. |
bytes | False | data | Accompanying transaction data. |
PulledPartial()
PulledPartial()
Emitted during pullPartial() and pullMultiPartial()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | locker | The locker "asset" is pulled from. |
address | True | asset | The asset being pulled. |
uint256 | False | amount | The amount of "asset" being pulled (or could represent a percentage, in basis points). |
bytes | False | data | Accompanying transaction data. |
PushedERC721()
PushedERC721()
Emitted during pushERC721() and pushMultiERC721()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | locker | The locker receiving "asset". |
address | True | asset | The ERC721 contract. |
tokenId | The ID for a given "asset" / NFT. | ||
bytes | False | data | Accompanying data for the transaction. |
PulledERC721()
PulledERC721()
Emitted during pullERC721() and pullMultiERC721()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | locker | The locker "assets" are pulled from. |
address | True | asset | The ERC721 contract. |
uint256 | True | tokenId | The ID for a given "asset" / NFT. |
bytes | False | data | Accompanying data for the transaction. |
PushedERC1155()
PushedERC1155()
Emitted during pushERC1155()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | locker | The locker receiving "asset". |
address | True | asset | The ERC1155 contract. |
uint256[] | False | ids | The IDs for a given "asset" (ERC1155), corresponds to "amounts". |
uint256[] | False | amounts | The amount of "id" to transfer. |
bytes | False | data | Accompanying data for the transaction. |
PulledERC1155()
PulledERC1155()
Emitted during pullERC1155()
Type | Indexed | Name | Description |
---|---|---|---|
address | True | locker | The locker "asset" is pulled from. |
address | True | asset | The ERC1155 contract. |
uint256[] | False | ids | The IDs for a given "asset" (ERC1155), corresponds to "amounts". |
uint256[] | False | amounts | The amount of "id" to transfer. |
bytes | False | data | Accompanying data for the transaction. |
Last updated