Skip to main content

Introduction

An introduction to the ZORA V3 smart contracts#

V3 Core Addresses#

Source code for all ZORA V3 contracts can be found in this GitHub repository.

Mainnet Deployments#


Ethereum - 1#
ContractAddress
Module Manager0x850A7c6fE2CF48eea1393554C8A3bA23f20CC401
ERC-721 TransferHelper0x909e9efE4D87d1a6018C2065aE642b6D0447bc91
ERC-20 TransferHelper0xCCA379FDF4Beda63c4bB0e2A3179Ae62c8716794
Protocol Fee Settings0x9641169A1374b77E052E1001c5a096C29Cd67d35
Polygon - 137#
ContractAddress
Module Manager0xCCA379FDF4Beda63c4bB0e2A3179Ae62c8716794
ERC-721 TransferHelper0xCe6cEf2A9028e1C3B21647ae3B4251038109f42a
ERC-20 TransferHelper0x909e9efE4D87d1a6018C2065aE642b6D0447bc91
Protocol Fee Settings0x9641169A1374b77E052E1001c5a096C29Cd67d35

Testnet Deployments#


Ropsten - 3#
ContractAddress
Module Manager0x3120f8A161bf8ae8C4287A66920E7Fd875b41805
ERC-721 TransferHelper0x0afB6A47C303f85c5A6e0DC6c9b4c2001E6987ED
ERC-20 TransferHelper0x88880cF1c91CD117040120813D28FEdC1CeCac41
Protocol Fee Settings0x5312484b5b23Cb01A52DC22111BbcF7Ebb198328
Rinkeby - 4#
ContractAddress
Module Manager0xa248736d3b73A231D95A5F99965857ebbBD42D85
ERC-721 TransferHelper0x029AA5a949C9C90916729D50537062cb73b5Ac92
ERC-20 TransferHelper0x408AbC192a5e9696085EBaFC7C5A88e19e66241b
Protocol Fee Settings0x8Ecd14bd28bf992B6d0595B3E35d5C206e2e2dbb
Mumbai - 80001#
ContractAddress
Module Manager0x850A7c6fE2CF48eea1393554C8A3bA23f20CC401
ERC-721 TransferHelper0x909e9efE4D87d1a6018C2065aE642b6D0447bc91
ERC-20 TransferHelper0xCCA379FDF4Beda63c4bB0e2A3179Ae62c8716794
Protocol Fee Settings0x9641169A1374b77E052E1001c5a096C29Cd67d35

note

The addresses for specific ZORA modules can be found in the Modules folder linked in the chart below.

Supported V3 Modules#

Module NameMainnet DeploymentV3 PackageAPIZora.co
Asks
OffersSoon ™️Soon ™️
Reserve AuctionSoon ™️Soon ™️

Getting Started#

Installing the V3 Package#

You can begin building with ZORA V3 by installing the v3 package. This package provides ZORA contract address, ABIs, and supports typechain to make it easier to get started.

yarn add @zoralabs/v3

Source code for all ZORA V3 contracts can be found in this GitHub repository. If you are interested to contributing to ZORA V3 you can learn more here.

ZORA V3 is comprised of a few core contracts and an ever-expanding set of modules. Modules are non-upgradable contracts that add specific functionality to the protocol.

  • Modules: Contracts with specific functionality that can be added to ZORA V3

  • Module Manager: Manages which modules a user has approved to use their tokens and which new modules can be added to the protocol

  • Transfer Helpers: Handles transferring ERC-20 and ERC-721 tokens for the modules

zorav3diagram

Approving Tokens to V3#

Tokens must first be approved to their respective Transfer Helper contracts before being able to be used by the ZORA modules. For example, all ERC-721 token approvals must be made to the ERC-721 Transfer Helper. Once completed, the user will then need to approve which modules can access their approved tokens by submitting a transaction to the Module Manager. This means that a user will only need to approve each token contract to ZORA V3 once and then approve which ZORA modules can access to their tokens.

note

We have created a guide on ZORA V3 approvals if you would like to learn more.

Lastly, if a user is trying to make a purchase with just ETH then they don't need to approve Transfer Helpers or ZORA modules.


Approving Modules#

Users can either approve a single ZORA module or selectively batch approve certain modules. Every time a new module is added to the protocol a user must opt in and approve the newly added module to access to their tokens. Approving a module means that all tokens that have been approved to the Transfer Helpers will be able to be accessed by that module.

setApprovalForModule#

Approves a single module to access a user's tokens.

setApprovalForModule(address _moduleAddress, bool _approved)

setBatchApprovalForModules#

Approves a series of modules to access a user's tokens.

setBatchApprovalForModules(  address[] memory _moduleAddresses,   bool _approved) 

setApprovalForModuleBySig#

Sets approval for a module given an EIP-712 signature

setApprovalForModuleBySig(  address _module,  address _user,  bool _approved,  uint256 _deadline,  uint8 _v,  bytes32 _r,  bytes32 _s)