Whitelist Context & Compliance Overview

The guide will cover the following:

  • Create a Whitelist Context
  • Create a Whitelist Compliance Context
  • Add an address to a Whitelist Context
  • Remove an address from a Whitelist Context
  • Add a Whitelist Context to a Whitelist Compliance Context
  • Remove a Whitelist Context from a Whitelist Compliance Context

Create Whitelist Context

Use IWhitelistContextFactory interface's createContext function to create a new Whitelist Context.

To retrieve the whitelist context address; list the transaction receipt and collect the ContextAdded event.


function createContext(
    string calldata name,
    string calldata description,
    address operator,
    bytes memory extraContextCreationArguments
) external returns (address);

Note: Address returned will be the whitelist context smart contract address.


Parameters


name

Name of the context

description

Description of the context

operator

Address of the context operator/controller

extraContextCreationArguments

Any extra data (zero bytes for now)

Create Whitelist Compliance Context

Use IWhitelistComplianceContextFactory interface's createContext function to create a new Whitelist Compliance Context by populating following parameters:

To retrieve the whitelist compliance context address; list the transaction receipt and collect the ContextAdded event.


function createContext(
     string calldata name,
     string calldata description,
     address operator
     bytes memory extraContextCreationArguments
) external returns (address);

Note: address returned will be the whitelist compliance context smart contract address.


Parameters


name

Name of the context

description

Description of the context

operator

Address of the context operator/controller

extraContextCreationArguments

Any extra data (zero bytes for now)

Whitelist Context

Add an address to a Whitelist Context

Using IWhitelistContext interface's addAddress function, add an address to a whitelist context.


function addAddress(address address_) external;

Parameters


address

Wallet address to be added


Remove an address to a Whitelist Context

Using IWhitelistContext interface's removeAddress function, remove an address from a whitelist context.


function removeAddress(address address_) external;

Parameters


address

Wallet address to be added

Whitelist Compliance Context

Add a Whitelist Context to a Whitelist Compliance Context

Using IWhitelistComplianceContext interface's addContractAddress function, add a whitelist context to a whitelist compliance context.


function addContractAddress(
    address address_,
    uint8 enumValue_,
    uint id_
) external;

Parameters


address

Whitelist context address | IERC721 contract address | IERC1155 contract address

enumValue

WhitelistContextType enum value

id

Token id for IERC721 and IERC1155 contracts


Remove a Whitelist Context from a Whitelist Compliance Context

Using IWhitelistComplianceContext interface's removeContractAddress function, remove a whitelist context from a whitelist compliance context.


function removeContractAddress(address _address) external;

Parameters


address

Whitelist | IERC721 | IERC1155 context address

Interested in third-party integrations?

Contact our sales team for more information

Have questions?

View answers to the most common questions about our platforms and services

Search