LogoLogo
User DocsDeveloper DocsHow-To Guides
  • ➡️Start Here
  • 🚧Disclaimer
  • User Docs
    • Introduction
    • Fund Overview
    • zVLT
    • Tranches
    • ZVE Token
  • How-To Guides
    • Complete KYC/KYB
    • Mint Tranche Tokens
    • Stake Tranche Tokens
  • Developer Docs
    • Contract Addresses
    • Core Contracts
      • ZivoeDAO.sol
      • ZivoeGlobals.sol
      • ZivoeGovernorV2.sol
      • ZivoeITO.sol
      • ZivoeLocker.sol
      • ZivoeMath.sol
      • ZivoeRewards.sol
      • ZivoeRewardsVesting.sol
      • ZivoeToken.sol
      • ZivoeTranches.sol
      • ZivoeTrancheToken.sol
      • ZivoeYDL.sol
      • ZivoeVault.sol
      • ZivoeRouter.sol
    • Lockers
      • OCC_Modular.sol
      • OCE_ZVE.sol
      • OCL_ZVE.sol
      • OCR_Modular.sol
      • OCT_DAO.sol
      • OCT_Convert.sol
      • OCT_YDL.sol
      • OCT_ZVL.sol
      • OCY_Convex_A.sol
      • OCY_Convex_B.sol
      • OCY_Convex_C.sol
      • OCY_OUSD.sol
      • ZivoeSwapper.sol
  • Official Links
    • Audits
    • Website
    • Twitter
    • Telegram
    • Blog
  • Terms
    • Terms Of Use / Privacy Policy
    • Reg S Compliance
Powered by GitBook

Zivoe Finance - Official Documentation

On this page
  • Introduction
  • Sections
  • Read Functions
  • Write Functions
  1. Developer Docs
  2. Core Contracts

ZivoeLocker.sol

Abstract Locker Contract

Introduction

This contract standardizes communication between the DAO and lockers.

Note: This is an abstract contract and is inherited by Lockers, see Lockers

Sections

Read Functions

  • canPush() - Permission for calling pushToLocker().

  • canPull() - Permission for calling pullFromLocker().

  • canPullPartial() - Permission for calling pullFromLockerPartial().

  • canPushMulti() - Permission for calling pushToLockerMulti().

  • canPullMulti() - Permission for calling pullFromLockerMulti().

  • canPullMultiPartial() - Permission for calling pullFromLockerMultiPartial().

  • canPushERC721() - Permission for calling pushFromLockerERC721().

  • canPullERC721() - Permission for calling pullFromLockerERC721().

  • canPushMultiERC721() - Permission for calling pushFromLockerMultiERC721().

  • canPullMultiERC721() - Permission for calling pullFromLockerMultiERC721().

  • canPushERC1155() - Permission for calling pushToLockerERC1155().

  • canPullERC1155() - Permission for calling pullFromLockerERC1155().

Write Functions

  • pushToLocker() - Migrates specific amount of ERC20 from owner() to locker.

  • pullFromLocker() - Migrates entire ERC20 balance from locker to owner().

  • pullFromLockerPartial() - Migrates specific amount of ERC20 from locker to owner().

  • pushToLockerMulti() - Migrates specific amounts of ERC20s from owner() to locker.

  • pullFromLockerMulti() - Migrates full amount of ERC20s from locker to owner().

  • pullFromLockerMultiPartial() - Migrates specific amounts of ERC20s from locker to owner().

  • pushToLockerERC721() - Migrates an ERC721 from owner() to locker.

  • pullFromLockerERC721() - Migrates an ERC721 from locker to owner().

  • pushToLockerMultiERC721() - Migrates ERC721s from owner() to locker.

  • pullFromLockerMultiERC721() - Migrates ERC721s from locker to owner().

  • pushToLockerERC1155() - Migrates ERC1155 assets from owner() to locker.

  • pullFromLockerERC1155() - Migrates ERC1155 assets from locker to owner().

Read Functions

canPush()

Permission for calling pushToLocker().

function canPush() public virtual view returns (bool);

canPull()

Permission for calling pullFromLocker().

function canPull() public virtual view returns (bool);

canPullPartial()

Permission for calling pullFromLockerPartial().

function canPullPartial() public virtual view returns (bool);

canPushMulti()

Permission for calling pushToLockerMulti().

function canPushMulti() public virtual view returns (bool);

canPullMulti()

Permission for calling pullFromLockerMulti().

function canPullMulti() public virtual view returns (bool);

canPullMultiPartial()

Permission for calling pullFromLockerMultiPartial().

function canPullMultiPartial() public virtual view returns (bool);

canPushERC721()

Permission for calling pushFromLockerERC721().

function canPushERC721() public virtual view returns (bool);

canPullERC721()

Permission for calling pullFromLockerERC721().

function canPullERC721() public virtual view returns (bool);

canPushMultiERC721()

Permission for calling pushFromLockerMultiERC721().

function canPushMultiERC721() public virtual view returns (bool);

canPullMultiERC721()

Permission for calling pullFromLockerMultiERC721().

function canPullMultiERC721() public virtual view returns (bool);

canPushERC1155()

Permission for calling pushToLockerERC1155().

function canPushERC1155() public virtual view returns (bool);

canPullERC1155()

Permission for calling pullFromLockerERC1155().

function canPullERC1155() public virtual view returns (bool);

Write Functions

pushToLocker()

Migrates specific amount of ERC20 from owner() to locker.

function pushToLocker(
    address asset, 
    uint256 amount, 
    bytes calldata data
) external virtual onlyOwner;
Type
Name
Description

address

asset

The asset to migrate.

uint256

amount

The amount of "asset" to migrate.

bytes

data

Accompanying transaction data.

pullFromLocker()

Migrates entire ERC20 balance from locker to owner().

function pullFromLocker(
    address asset, 
    bytes calldata data
) external virtual onlyOwner;
Type
Name
Description

address

asset

The asset to migrate.

bytes

data

Accompanying transaction data.

pullFromLockerPartial()

Migrates specific amount of ERC20 from locker to owner().

function pullFromLockerPartial(
    address asset, 
    uint256 amount, 
    bytes calldata data
) external virtual onlyOwner;
Type
Name
Description

address

asset

The asset to migrate.

uint256

amount

The amount of "asset" to migrate.

bytes

data

Accompanying transaction data.

pushToLockerMulti()

Migrates specific amounts of ERC20s from owner() to locker.

function pushToLockerMulti(
    address[] calldata assets, 
    uint256[] calldata amounts, 
    bytes[] calldata data
) external virtual onlyOwner;
Type
Name
Description

address[]

assets

The assets to migrate.

uint256[]

amounts

The amounts of "assets" to migrate, corresponds to "assets" by position in array.

bytes[]

data

Accompanying transaction data.

pullFromLockerMulti()

Migrates full amount of ERC20s from locker to owner().

function pullFromLockerMulti(
    address[] calldata assets, 
    bytes[] calldata data
) external virtual onlyOwner;
Type
Name
Description

address[]

assets

The assets to migrate.

bytes[]

data

Accompanying transaction data.

pullFromLockerMultiPartial()

Migrates specific amounts of ERC20s from locker to owner().

function pullFromLockerMultiPartial(
    address[] calldata assets, 
    uint256[] calldata amounts, 
    bytes[] calldata data
) external virtual onlyOwner;
Type
Name
Description

address[]

assets

The assets to migrate.

uint256[]

amounts

The amounts of "assets" to migrate, corresponds to "assets" by position in array.

bytes[]

data

Accompanying transaction data.

pushToLockerERC721()

Migrates an ERC721 from owner() to locker.

 function pushToLockerERC721(
     address asset,
     uint256 tokenId,
     bytes calldata data
 ) external virtual onlyOwner;
Type
Name
Description

address

asset

The NFT contract.

uint256

tokenId

The ID of the NFT to migrate.

bytes

data

Accompanying transaction data.

pullFromLockerERC721()

Migrates an ERC721 from locker to owner().

function pullFromLockerERC721(
    address asset,
    uint256 tokenId,
    bytes calldata data
) external virtual onlyOwner;
Type
Name
Description

address

asset

The NFT contract.

uint256

tokenId

The ID of the NFT to migrate.

bytes

data

Accompanying transaction data.

pushToLockerMultiERC721()

Migrates ERC721s from owner() to locker.

function pushToLockerMultiERC721(
    address[] calldata assets, 
    uint256[] calldata tokenIds, 
    bytes[] calldata data
) external virutal onlyOwner;
Type
Name
Description

address[]

assets

The NFT contracts.

uint256[]

tokenIds

The IDs of the NFTs to migrate.

bytes[]

data

Accompanying transaction data.

pullFromLockerMultiERC721()

Migrates ERC721s from locker to owner().

function pullFromLockerMultiERC721(
    address[] calldata assets,
    uint256[] calldata tokenIds,
    bytes[] calldata data
) external virtual onlyOwner;
Type
Name
Description

address[]

assets

The NFT contracts.

uint256[]

tokenIds

The IDs of the NFTs to migrate.

bytes[]

data

Accompanying transaction data.

pushToLockerERC1155()

Migrates ERC1155 assets from owner() to locker.

function pushToLockerERC1155(
    address asset,
    uint256[] calldata ids,
    uint256[] calldata amounts,
    bytes calldata data
) external virtual onlyOwner;
Type
Name
Description

address

asset

The ERC1155 contract.

uint256[]

ids

The IDs of the assets within the ERC1155 to migrate.

uint256[]

amounts

The amounts to migrate.

bytes

data

Accompanying transaction data.

pullFromLockerERC1155()

Migrates ERC1155 assets from locker to owner().

function pullFromLockerERC1155(
    address asset,
    uint256[] calldata ids,
    uint256[] calldata amounts,
    bytes calldata data
) external virtual onlyOwner;
Type
Name
Description

address

asset

The ERC1155 conract.

uint256[]

ids

The IDs of the assets within the ERC1155 to migrate.

uint256[]

amounts

The amounts to migrate.

bytes

data

Accompanying transaction data.

PreviousZivoeITO.solNextZivoeMath.sol

Last updated 11 months ago