Z
Z
Zesty Market
Search…
ZestyVault

Introduction

Zesty Vault is an abstract contract which specifies how Zesty NFTs would be deposited and withdrawn. It allows the assignment of operators to any address to act on behalf of the address.

Specifications

Constructor

Specify the zestyNFT address to be used
1
constructor(address zestyNFTAddress_)
Copied!

Getter Functions

getZestyNFTAddress

Returns the zesty NFT address
1
function getZestyNFTAddress() public virtual view returns (address) {
Copied!

getDepositor

Returns the depositor for a given token id
1
function getDepositor(uint256 _tokenId) public virtual view returns (address)
Copied!

isDepositor

Returns a bool whether the msg.sender is the depositor for a given token id
1
function isDepositor(uint256 _tokenId) public virtual view returns (bool)
Copied!

getOperator

Returns the operator address for a given depositor address. Note that since the operator is an address to address mapping. The operator does not need to operate only on depositors. Any address would suffice.
1
function getOperator(address _depositor) public virtual view returns (address)
Copied!

isOperator

Returns a bool whether a given address is an operator for a depositor
1
function isOperator(address _depositor, address _operator) public virtual view returns (bool)
Copied!

onERC721Received

ERC721 function to allow receipt of ERC721
1
function onERC721Received(address, address, uint256, bytes memory) public virtual override returns (bytes4)
Copied!

State Changing Functions

authorizeOperator

Authorizes an operator for msg.sender
1
function authorizeOperator(address _operator) public virtual
Copied!

revokeOperator

Revokes an operator for msg.sender
1
function revokeOperator(address _operator) public virtual
Copied!

_depositZestyNFT

An internal function that is to be used by inherited contracts that allow for the deposit of NFTs.
1
function _depositZestyNFT(uint256 _tokenId) internal virtual
Copied!

_withdrawZestyNFT

An internal function that is to be used by inherited contracts that allow for the withdrawal of NFTs.
1
function _withdrawZestyNFT(uint256 _tokenId) internal virtual onlyDepositor(_tokenId)
Copied!

Modifiers

onlyDepositor

Allow only depositors
1
modifier onlyDepositor(uint256 _tokenId)
Copied!

onlyOperator

Allow only operators
1
modifier onlyOperator(uint256 _tokenId)
Copied!

onlyDepositorOrOperator

Allow only depositor or operator
1
modifier onlyDepositorOrOperator(uint256 _tokenId)
Copied!
Last modified 3mo ago