# ZivoeDAO.sol

## 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).

{% embed url="<https://www.figma.com/board/qjuQ0uGQl9QD7KeBwyf73d/Zivoe-Visualization?node-id=207-522&t=P90hTl415XLXLxHf-4>" %}

#### State Variables

<table><thead><tr><th width="129.33333333333331">Type</th><th width="153">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>GBL</td><td>The ZivoeGlobals contract.</td></tr></tbody></table>

## Sections

[#write-functions](#write-functions "mention")

* [#push](#push "mention") - Pushes an ERC20 token from ZivoeDAO to locker.
* [#pull](#pull "mention") - Pulls ERC20 from locker to ZivoeDAO.
* [#pullpartial](#pullpartial "mention") - Pulls specific amount of ERC20 from locker to ZivoeDAO.
* [#pushmulti](#pushmulti "mention") - Pushes ERC20(s) from locker to ZivoeDAO.
* [#pullmulti](#pullmulti "mention") - Pulls ERC20(s) from locker to ZivoeDAO.
* [#pullmultipartial](#pullmultipartial "mention") - Pulls specific amount(s) of ERC20(s) from locker to ZivoeDAO.
* [#pusherc721](#pusherc721 "mention") - Pushes an NFT from ZivoeDAO to locker.
* [#pushmultierc721](#pushmultierc721 "mention") - Pushes NFT(s) from ZivoeDAO to locker.
* [#pullerc721](#pullerc721 "mention") - Pulls an NFT from locker to ZivoeDAO.
* [#pushmultierc721](#pushmultierc721 "mention") - Pulls NFT(s) from locker to ZivoeDAO.
* [#pusherc1155](#pusherc1155 "mention") - Pushes ERC1155 assets from ZivoeDAO to locker.
* [#pullerc1155](#pullerc1155 "mention") - Pulls ERC1155 assets from locker to ZivoeDAO.

[#events](#events "mention")

* [#pushed](#pushed "mention")
* [#pulled](#pulled "mention")
* [#pulledpartial](#pulledpartial "mention")
* [#pushederc721](#pushederc721 "mention")
* [#pullederc721](#pullederc721 "mention")
* [#pushederc1155](#pushederc1155 "mention")
* [#pullederc1155](#pullederc1155 "mention")

##

## Write Functions

#### `push()`

Pushes an ERC20 token from ZivoeDAO to locker.

```solidity
function push(
    address locker, 
    address asset, 
    uint256 amount, 
    bytes calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="119.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to push an ERC20 token to.</td></tr><tr><td>address</td><td>asset</td><td>The ERC20 token to push.</td></tr><tr><td>uint256</td><td>amount</td><td>The amount of "asset" to push.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

Emits the [#pushed](#pushed "mention") event

#### `pull()`

Pulls ERC20 from locker to ZivoeDAO.

```solidity
function pull(
    address locker, 
    address asset, 
    bytes calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="119.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to pull from.</td></tr><tr><td>address</td><td>asset</td><td>The asset to pull.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

Emits the [#pulled](#pulled "mention") event

#### `pullPartial()`

Pulls specific amount of ERC20 from locker to ZivoeDAO.

```solidity
function pullPartial(
    address locker, 
    address asset, 
    uint256 amount, 
    bytes calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="119.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to pull from.</td></tr><tr><td>address</td><td>asset</td><td>The asset to pull.</td></tr><tr><td>uint256</td><td>amount</td><td>The amount to pull (may not refer to "asset", but rather a different asset within the locker).</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

Emits the [#pulledpartial](#pulledpartial "mention") event

#### `pushMulti()`

Pushes ERC20(s) from locker to ZivoeDAO.

```solidity
function pushMulti(
    address locker, 
    address[] calldata assets, 
    uint256[] calldata amounts, 
    bytes[] calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="140.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to push capital to.</td></tr><tr><td>address[]</td><td>assets</td><td>The assets to push to locker.</td></tr><tr><td>uint256[]</td><td>amounts</td><td>The amount of "asset" to push.</td></tr><tr><td>bytes[]</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

Emits the [#pushed](#pushed "mention") event (multiple times)

#### `pullMulti()`

Pulls ERC20(s) from locker to ZivoeDAO.

```solidity
function pullMulti(
    address locker, 
    address[] calldata assets, 
    bytes[] calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="125.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to pull from.</td></tr><tr><td>address[]</td><td>assets</td><td>The assets to pull.</td></tr><tr><td>bytes[]</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

Emits the [#pulled](#pulled "mention") event (multiple times)

#### `pullMultiPartial()`

Pulls specific amount(s) of ERC20(s) from locker to ZivoeDAO.

```solidity
function pullMultiPartial(
    address locker, 
    address[] calldata assets, 
    uint256[] calldata amounts, 
    bytes[] calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="126.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to pull from.</td></tr><tr><td>address[]</td><td>assets</td><td>The asset(s) to pull.</td></tr><tr><td>uint256[]</td><td>amounts</td><td>The amount(s) to pull (may not refer to "asset", rather a different asset within the locker).</td></tr><tr><td>bytes[]</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

Emits the [#pulledpartial](#pulledpartial "mention") event (multiple times)

#### `pushERC721()`

Pushes an NFT from ZivoeDAO to locker.

```solidity
function pushERC721(
    address locker, 
    address asset, 
    uint256 tokenId, 
    bytes calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="119.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to push an NFT to.</td></tr><tr><td>address</td><td>asset</td><td>The NFT contract.</td></tr><tr><td>uint256</td><td>tokenId</td><td>The NFT tokenId to push.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>

Emits the [#pushederc721](#pushederc721 "mention")

#### `pushMultiERC721()`

Pushes NFT(s) from ZivoeDAO to locker.

```solidity
function pushMultiERC721(
    address locker, 
    address[] calldata assets, 
    uint[] calldata tokenIds, 
    bytes[] calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="140.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to push NFTs to.</td></tr><tr><td>address[]</td><td>assets</td><td>The NFT contract(s).</td></tr><tr><td>uint256[]</td><td>tokenIds</td><td>The NFT tokenId(s) to push.</td></tr><tr><td>bytes[]</td><td>data</td><td>Accompanying data for the transaction(s).</td></tr></tbody></table>

Emits the [#pushederc721](#pushederc721 "mention") event (multiple times)

#### `pullERC721()`

Pulls an NFT from locker to ZivoeDAO.

```solidity
function pullERC721(
    address locker, 
    address asset, 
    uint tokenId, 
    bytes calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="119.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to pull from.</td></tr><tr><td>address</td><td>asset</td><td>The NFT contract.</td></tr><tr><td>uint256</td><td>amount</td><td>The NFT tokenId to pull.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>

Emits the [#pullederc721](#pullederc721 "mention")

#### `pullMultiERC721()`

Pulls NFT(s) from locker to ZivoeDAO.

```solidity
function pullMultiERC721(
    address locker,
    address[] calldata assets,
    uint[] calldata tokenIds,
    bytes[] calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="126.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to pull from.</td></tr><tr><td>address[]</td><td>assets</td><td>The NFT contract(s).</td></tr><tr><td>uint256[]</td><td>tokenIds</td><td>The NFT tokenId(s) to pull.</td></tr><tr><td>bytes[]</td><td>data</td><td>Accompanying data for the transaction(s).</td></tr></tbody></table>

Emits the [#pullederc721](#pullederc721 "mention") event (multiple times)

#### `pushERC1155()`

Pushes ERC1155 assets from ZivoeDAO to locker.

```solidity
function pushERC1155Batch(
    address locker,
    address asset,
    uint256[] calldata ids, 
    uint256[] calldata amounts,
    bytes calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="143.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to push ERC1155 assets to.</td></tr><tr><td>address</td><td>asset</td><td>The ERC1155 asset to push to locker.</td></tr><tr><td>uint256[]</td><td>ids</td><td>The ids of "assets" to push.</td></tr><tr><td>uint256[]</td><td>amounts</td><td>The amounts of "assets" to push.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>

Emits the [#pushederc1155](#pushederc1155 "mention") event

#### `pullERC1155()`

Pulls ERC1155 assets from locker to ZivoeDAO.

```solidity
function pullERC1155Batch(
    address locker,
    address asset,
    uint256[] calldata ids, 
    uint256[] calldata amounts,
    bytes calldata data
) external onlyOwner nonReentrant;
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>locker</td><td>The locker to pull from.</td></tr><tr><td>address</td><td>asset</td><td>The ERC1155 asset to pull.</td></tr><tr><td>uint256[]</td><td>ids</td><td>The ids of "assets" to pull.</td></tr><tr><td>uint256[]</td><td>amounts</td><td>The amounts of "assets" to pull.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>

Emits the [#pullederc1155](#pullederc1155 "mention") event

## Events

#### **`Pushed()`**

Emitted during [#push](#push "mention") and [#pushmulti](#pushmulti "mention")

```solidity
event Pushed(
    address indexed locker, 
    address indexed asset, 
    uint256 amount, 
    bytes data
);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>locker</td><td>The locker receiving "asset".</td></tr><tr><td>address</td><td>True</td><td>asset</td><td>The asset being pushed.</td></tr><tr><td>uint256</td><td>False</td><td>amount</td><td>The amount of "asset" being pushed.</td></tr><tr><td>bytes</td><td>False</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

#### **`Pulled()`**

Emitted during [#pull](#pull "mention") and [#pullmulti](#pullmulti "mention")

```solidity
event Pulled(
    address indexed locker, 
    address indexed asset, 
    bytes data
);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>locker</td><td>The locker "asset" is pulled from.</td></tr><tr><td>address</td><td>True</td><td>asset</td><td>The asset being pulled.</td></tr><tr><td>bytes</td><td>False</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

#### **`PulledPartial()`**

Emitted during [#pullpartial](#pullpartial "mention") and [#pullmultipartial](#pullmultipartial "mention")

```solidity
event PulledPartial(
    address indexed locker, 
    address indexed asset, 
    uint256 amount, 
    bytes data
);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>locker</td><td>The locker "asset" is pulled from.</td></tr><tr><td>address</td><td>True</td><td>asset</td><td>The asset being pulled.</td></tr><tr><td>uint256</td><td>False</td><td>amount</td><td>The amount of "asset" being pulled (or could represent a percentage, in basis points).</td></tr><tr><td>bytes</td><td>False</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

#### **`PushedERC721()`**

Emitted during [#pusherc721](#pusherc721 "mention") and [#pushmultierc721](#pushmultierc721 "mention")

```solidity
event PushedERC721(
    address indexed locker, 
    address indexed asset, 
    uint256 indexed tokenId, 
    bytes data
);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>locker</td><td>The locker receiving "asset".</td></tr><tr><td>address</td><td>True</td><td>asset</td><td>The ERC721 contract.</td></tr><tr><td></td><td></td><td>tokenId</td><td>The ID for a given "asset" / NFT.</td></tr><tr><td>bytes</td><td>False</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>

#### **`PulledERC721()`**

Emitted during [#pullerc721](#pullerc721 "mention") and [#pullmultierc721](#pullmultierc721 "mention")

```solidity
event PulledERC721(
    address indexed locker, 
    address indexed asset, 
    uint256 indexed tokenId, 
    bytes data
);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>locker</td><td>The locker "assets" are pulled from.</td></tr><tr><td>address</td><td>True</td><td>asset</td><td>The ERC721 contract.</td></tr><tr><td>uint256</td><td>True</td><td>tokenId</td><td>The ID for a given "asset" / NFT.</td></tr><tr><td>bytes</td><td>False</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>

#### **`PushedERC1155()`**

Emitted during [#pusherc1155](#pusherc1155 "mention")

```solidity
event PushedERC1155(
    address indexed locker, 
    address indexed asset, 
    uint256[] ids, 
    uint256[] amounts, 
    bytes data
);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>locker</td><td>The locker receiving "asset".</td></tr><tr><td>address</td><td>True</td><td>asset</td><td>The ERC1155 contract.</td></tr><tr><td>uint256[]</td><td>False</td><td>ids</td><td>The IDs for a given "asset" (ERC1155), corresponds to "amounts".</td></tr><tr><td>uint256[]</td><td>False</td><td>amounts</td><td>The amount of "id" to transfer.</td></tr><tr><td>bytes</td><td>False</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>

#### **`PulledERC1155()`**

Emitted during [#pullerc1155](#pullerc1155 "mention")

```solidity
event PulledERC1155(
    address indexed locker, 
    address indexed asset, 
    uint256[] ids, 
    uint256[] amounts, 
    bytes data
);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>locker</td><td>The locker "asset" is pulled from.</td></tr><tr><td>address</td><td>True</td><td>asset</td><td>The ERC1155 contract.</td></tr><tr><td>uint256[]</td><td>False</td><td>ids</td><td>The IDs for a given "asset" (ERC1155), corresponds to "amounts".</td></tr><tr><td>uint256[]</td><td>False</td><td>amounts</td><td>The amount of "id" to transfer.</td></tr><tr><td>bytes</td><td>False</td><td>data</td><td>Accompanying data for the transaction.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zivoe.com/developer-docs/core-contracts/zivoedao.sol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
