LogoLogo
  • Envelop (NIFTSY) documentation
  • Documents
    • Key terms
    • F.A.Q.
    • White paper
      • Disclaimers
      • Introduction
      • Key terms
      • Industry (market) analysis and NIFTSY's place in it
        • Figures and facts
        • Possible implementations of Envelop
      • Protocol. Oracle. Index
        • Protocol
          • NFT as a new order ETF and a brief history of NIFTSY
        • Oracle
        • Index
      • The architecture of the Project and the role of the Token
        • DAO. Token. IDO
        • The token as a linking element in the project
        • IDO (Initial DAO offering)
      • Roadmap. Part. #01
      • Roadmap. Part #02
      • Conclusion
      • List of references
    • Lite paper
      • Abstract
      • Disclaimers
      • Market challenges - our solutions
      • The main hypostases and parts of the Project
      • Development strategy and market coverage
      • Additions
    • White paper (Spanish)
      • Descargo de responsabilidad
      • Introducción
      • Términos clave
      • Análisis de la industria (mercado) y el lugar de NIFTSY en el
        • Figuras y hechos
        • Posibles implementaciones de NIFTSY
      • Protocolo. Oráculo. Índice
        • Protocolo
        • NFTs como un nuevo de EFT y una breve historia de NIFTS
        • Oraculo
        • Índice
        • Untitled
      • La arquitectura del proyecto y el rol del token
        • DAO. Token. IDO
        • El token como un elemento vinculante en el proyecto
        • IDO
      • Mapa de ruta
      • Conclusiones
      • Lista de referencias
    • Lite paper (Spanish)
      • Abstracto
      • Descargo de responsabilidad
      • Los desafíos del mercado y nuestras soluciones
      • La hipótesis principal y partes del proyecto
      • Estrategia de desarrollo y cobertura de mercado
      • Adiciones
    • White paper (BAHASA INDONESIA)
      • PENAFIAN
      • PENGANTAR
      • ​KATA KUNCI
      • ANALISIS INDUSTRI (PASAR)) DAN KEDUDUKAN niftsy DI DALAMNYA
      • Angka dan Fakta
      • Kemungkinan implementasi NIFTSY
      • PROTOKOL. ORACLE. INDEKS
        • Protokol
        • Oracle
        • Indeks
      • ARSITEKTUR PROYEK DAN PERAN TOKEN
      • DAO. Token. IDO
      • Token sebagai elemen penghubung dalam proyek
      • IDO
      • ROADMAP
      • KESIMPULAN
      • DAFTAR REFERENSI
    • LITE PAPER (BAHASA INDONESIA)
      • Abstrak
      • Penafian
      • Tantangan pasar - solusi kami
      • Hipotesis utama dan bagian dari Proyek
      • Strategi pengembangan dan cakupan pasar
      • Tambahan
    • Tokenomics
      • General provisions
      • Links
  • Technical documentation
    • URLs of dAPPs
    • Technical paper
      • Introduction
      • Protocol
      • Oracle
      • Index
      • Stack
      • Conclusion
    • Smart-contracts
      • Deployment addresses v2
      • Deployment addresses v1
      • Deployment addresses v0
      • Security and smart contracts
      • Contract NiftsyERC20.sol
      • Protocol
        • V0
          • Audit
          • Contracts
            • WrapperWithERC20Collateral (V.0)
            • WrapperDistributor721.sol
            • WrapperFarming.sol
        • V1
          • Audit
          • Contracts
            • WrapperV1
            • AdvancedWhiteList.sol
            • EnvelopwNFT721
            • EnvelopwNFT1155
            • Saft
            • SBT smart-contract Factory
          • Gas measurements for Protocol version 1
      • Launchpad
        • V0
          • Launchpad.sol
        • V1
          • NFTKiosk.sol
          • DefaultPriceModel.sol
      • Subscription service
      • Factory (smart-contracts) minting
      • P2P NFT/wNFT trading service
    • Envelop dApps Troubleshooting
  • Tutorials
    • Introduction to tutorials
    • dApps
      • Minting
        • Version 0
          • Release notes
          • Instruction
          • Video
        • Version 1.1
          • Release notes
          • Instruction
          • Video
      • Main app
        • Version 0
          • Release notes
          • Instruction
          • Aptos instruction
          • Video
        • Version 1.0
          • Release notes
          • Instruction
        • Version 1.1
          • Release notes
          • Instruction
          • Video
      • Cross-NFT
        • Version 0
          • Release notes
          • Instruction
          • Video
      • Launchpad (wINO)
        • Version 0
          • Release notes
          • Instruction
          • Video
        • Version 1
          • Release notes
          • Instruction
            • NFT trading
            • ERC20 tokens trading
          • Video
      • Farming
        • Version 0
          • Release notes
          • Instruction
      • SAFT wNFT
        • Version 0
          • Release notices
          • Instruction
          • Video
        • Version 1.0
          • Release notices
          • Insctruction
          • Video
        • Version 1.1
          • Release notices
          • Insctruction
          • Video
    • Oracle
      • Version 0
        • Release notices
      • Version 1
        • Release notices
    • Subscription service
      • Version 0
        • Release notes
      • Version 1
        • Release notes
    • Metamask settings for different networks
    • How to wrap your NFT
    • How to make SAFT wNFT
    • How to unwrap your wNFT
    • How to mint Soulbound tokens with Envelop
    • How to use Wrapper from Safe Gnosis
    • Video tutorials
  • Bounty
    • Bounty FAQ
    • General conditions
    • Bounty rules
    • Approximate (maximum) activity estimates
    • Bug Bounty
  • Legal
    • Privacy-policy
    • Legal FAQ
    • DAO
    • Archive
      • Licence
  • ARHIVE
    • Archive tutorials
      • Wrap NFT
    • Others
      • Marketplace (Scotch.sale)
      • How do I buy on DEXs?
        • Uniswap
        • PancakeSwap
        • QuickSwap
Powered by GitBook
LogoLogo

Links:

  • envelop.is
  • daoenvelop.eth

dApps:

  • app.envelop.is
  • crossing

Soc. nets:

  • blog
  • youtube
On this page
  • Method getWLItem
  • Method getWLItemCount
  • Method getWLAddressByIndex
  • Method getWLAddresses
  • Method getBLItem
  • Method getBLItemCount
  • Method getBLAddressByIndex
  • Method getBLAddresses
  • Method enabledForCollateral
  • Method enabledForFee
  • Method enabledRemoveFromCollateral
  • Method rulesEnabled
  • Method validateRules

Was this helpful?

  1. Technical documentation
  2. Smart-contracts
  3. Protocol
  4. V1
  5. Contracts

AdvancedWhiteList.sol

This contract is used by the WrapperBaseV1 protocol contract to manage the white and black list of tokens and to retrieve data from them.

There is a whitelist of contract addresses in the protocol:

  • ERC-20, ERC-721, ERC-1155 tokens that can be used as Collateral tokens for wNFT;

  • ERC-20 tokens that can be used as fee (commission) tokens to be paid when transferring wNFT. The protocol has a blacklist of original NFT contract addresses that the protocol is not allowed to wrap. Only the ENVELOP project team can manage the lists. Any user can retrieve data from the lists.

Method getWLItem

function getWLItem(address _asset) external view returns (ETypes.WhiteListItem memory)

The method returns the settings for a specific smart-contract address from the white list.

Input method call parameters:

Name
Type
Description

_asset

address

Token smart-contract address from white list

A description of the returned data types can be found in the LibEnvelopTypes.sol contact, ETypes library.

Returned values:

Name
Type
Description

value

ETypes.WhiteListItem

Setting data for the token in the white-list

ETypes.WhiteListItem

Name
Type
Description

enabledForFee

bool

A sign of permission to use the token as a wNFT transfer fee token

enabledForCollateral

bool

A sign of permission to use token as Collateral token wNFT

enabledRemoveFromCollateral

bool

A sign of permission to tokens to remove (withdrawn) from the wNFT collateral without unwrapping it - used in private implementations of the Protocol

transferFeeModel

address

Address of the smart contract defining the rules for the allocation of transfer fees

Method getWLItemCount

function getWLItemCount() external view returns (uint256)

Method returns the number of tokens in the white address list. It has no input parameters.

Returned values:

Name
Type
Description

value

uint256

Number (Quantity)of token addresses in the white list

Method getWLAddressByIndex

function getWLAddressByIndex(uint256 _index) external view returns (ETypes.Asset memory)

Input method call parameters:

Name
Type
Description

_index

uint256

The serial number of the token address in the white list

Returned values:

Name
Type
Description

value

address

Token smart-contract address from white list

Method getWLAddresses

function getWLAddresses() external view returns (ETypes.Asset[] memory)

The method returns a list of whitelist token contract addresses. The method has no input parameters.

Returned values:

Name
Type
Description

value

address[]

Array of white list token contract addresses

Method getBLItem

function getBLItem(address _asset) external view returns (bool)

The method returns an indication of the blacklisting of the original NFT token.

Input parameters of the method call:

Name
Type
Description

_asset

address

Blacklisted token smart contract address

Returned values:

Name
Type
Description

value

bool

Indication that the smart contract address of the original NFT is blacklisted

Method getBLItemCount

function getBLItemCount() external view returns (uint256)

Method returns number of token addresses in blacklist of addresses. It has no input parameters.

Returned values:

Name
Type
Description

value

uint256

Number of token address on the blacklist

Method getBLAddressByIndex

function getBLAddressByIndex(uint256 _index) external view returns (ETypes.Asset memory)

The method returns the smart contract address of the blacklisted token by its sequence number in the blacklist.

Input method call parameters:

Name
Type
Description

_index

uint256

The serial number of the token address on the blacklist

Returned values:

Name
Type
Description

value

address

Blacklisted token smart contract address

Method getBLAddresses

function getBLAddresses() external view returns (ETypes.Asset[] memory)

The method returns a list of blacklist token contract addresses. The method has no input parameters.

Returned values:

Name
Type
Description

value

address[]

Array of blacklist token contract addresses

Method enabledForCollateral

function enabledForCollateral(address _asset) external view returns (bool)

The method for the token smart-contract address returns an indication if the tokens can be used to add to wNFT collateral.

Input method call parameters:

Name
Type
Description

_asset

address

Token smart contract address from white list

Returned values:

Name
Type
Description

value

bool

Indication of permission to use token as collateral token for wNFT

Method enabledForFee

function enabledForFee(address _asset) external view returns (bool)

The method for the token smart-contract address returns an indication if the tokens can be used to pay the wNFT transfer fee.

Input method call parameters:

Name
Type
Description

_asset

address

Token smart-contract address from white list

Returned values:

Name
Type
Description

value

bool

Token permission sign to use the token to pay the wNFT transfer fee

Method enabledRemoveFromCollateral

function enabledRemoveFromCollateral(address _asset) external view returns (bool)

The method for the token smart -contract address returns an indication if tokens can be removed (withdrawn) from wNFT collateral without being unwrapped.

Input (Incoming) method call parameters:

Name
Type
Description

_asset

address

Token smart contract address from white-list

Returned values:

Name
Type
Description

value

bool

Indication of permission to withdraw tokens from wNFT collateral without unwrapping it

Method rulesEnabled

function rulesEnabled(address _asset, bytes2 _rules) external view returns (bool)

The protocol has the option to set up rules of behavior for wNFTs created based on the specific original NFT (for all bits in rules two-bytes bitmask). It’s available for project team only (owner of contract). The method will return false if it do not match the rules bitmask passed to the method.

If the ENVELOP project team has banned individual rules for wNFTs created based on the original NFT (only for some particular bits in rules two-bytes bitmask) and the method is passed a description of individual rules with the same value in the banned bit of rules wNFT, then the method will return false.

For example, for the original NFT 1 in the lowest significant bit is forbidden (set to rule value 0001 for rules wNFT by the ENVELOP team). Then when passing individual rules behavior (e.g. 1110), the method will return true - such rules are allowed, the disallowed bit of rules wNFT is 0. When passing another value (e.g. 1001), the method will return false - such rules are not allowed.

Input method call parameters:

Name
Type
Description

_asset

address

The smart-contract address of the original NFT

_rules

bytes2

Description of wNFT behaviour rules based on the original NFT

Returned values:

Name
Type
Description

value

bool

Indication that the passed rules are allowed or disallowed

Method validateRules

function validateRules(address _asset, bytes2 _rules) external view returns (bytes2)

The method for the contract address of the original NFT returns a description of the allowed individual rules of behavior of the wNFT created on its basis as set by the ENVELOP project team.

If the ENVELOP project team has set such rules for all bits in rules two-bytes bitmask, the method will return the rule description set by the team. If the ENVELOP project team has restricted only particular wNFT rules (particular bits of rules wNFT) - it has prohibited particular values, then the method will return one of the allowed behavior rule descriptions.

For example, for the original NFT 1 in the lowest bit is forbidden (set rule value 0001 by the ENVELOP team in rules wNFT). Then when passing individual behavior rules (e.g. 1100), the method will return the value 1100. When passing a different value (e.g. 1001), the method will return 1000.

PreviousWrapperV1NextEnvelopwNFT721

Last updated 1 year ago

Was this helpful?