📂
DAO Envelop. NIFTSY
  • 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
On this page
  • Method "aprove"
  • Method "transferFrom"
  • Method "transfer"
  • Method "increaseAllowance"
  • Method "decreaseAllowance"
  • Method "allowance"
  • Method "balanceOf"
  1. Technical documentation
  2. Smart-contracts

Contract NiftsyERC20.sol

The NIFTSY token contract of the ERC-20 standard is classic in terms of OpenZeppelin standards.

PreviousSecurity and smart contractsNextProtocol

Last updated 3 years ago

The NIFTSY token contract of the ERC-20 standard is classic in terms of OpenZeppelin standards.

The only deviation from the standard is that all tokens are issued to the address of the protocol owners at the time the contract is being deployed into the network. No one has the ability to issue additional tokens or burn them. The burn and mint methods are not available.

Below is a list and description of the methods that users can call either in web scanner applications (e.g. ) or through various frameworks that have the ability to access the contract methods programmatically.

This smart contract was audited by a well-known independent company, Certik: .

Method "aprove"

function approve(address spender, uint256 amount) public virtual override returns (bool) {
     _approve(_msgSender(), spender, amount);
     return true;
}

The method allows the token holder to give permission to another user to manage their tokens. After invoking this method, the spender (who has been given permission) will be able to make transfers of the owner's tokens within the allowed amount. The method checks that the owner's address is not zero.

Parameters:

Name
Type
Description

spender

address

Address of the token spender (disposer/manager)

amount

uint256

Number of tokens allowed to be managed

Returns values:

Name
Type
Description

result

bool

True or False

Method "transferFrom"

function transferFrom(
     address sender, 
     address recipient, 
     uint256 amount
) public virtual override returns (bool) 

The method transfers tokens from the sender's balance to the recipient's balance. If the sender has given permission for another user to manage their tokens, then they can make the transfer by specifying the owner of the tokens in the sender parameter. In this case, the method will compare the number of tokens the sender is allowed to manage with the number of tokens it is trying to transfer. And disallow the transfer if the former is less than the latter. Otherwise the transfer will be made, reducing the number of owner tokens in the permission that the the spender can manage.

The method also verifies that the recipient's address is not zero and that the sender's token balance is sufficient to make the transfer.

Parameters:

Name
Type
Description

sender

address

Token sender address

recipient

address

The address of the recipient of the tokens

amount

uint256

Number of tokens that the user calling the method wants to transfer

Returns values:

Name
Type
Description

result

bool

True or False

Method "transfer"

function transfer(address recipient, uint256 amount) public virtual override returns (bool) 

The method transfers tokens from the balance of the user calling the method to the recipient's balance. The method checks that the recipient's address is not zero and that the sender's token balance is sufficient to make the transfer. If all conditions are met, the token balance of the user calling the method is reduced and the token balance of the recipient is increased.

Parameters:

Name
Type
Description

recipient

address

The address of the recipient of the tokens

amount

uint256

Number of tokens that the user calling the method wants to transfer

Returns values:

Name
Type
Description

result

bool

True of False

Method "increaseAllowance"

function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool)

The method allows the owner to increase the number of tokens that can be managed by another user. When this method is called, the spender (who has been given permission) will be able to make transfers of the owner's tokens within the updated amount. The method checks that the spender's address is not zero.

Parameters:

Name
Type
Description

spender

address

Address of the token spender (disposer/manager)

addedValue

uint256

Number of tokens by which the resolution is increased

Returns values:

Name
Type
Description

result

bool

True or False

Method "decreaseAllowance"

function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool)

The method allows the owner to reduce the number of tokens that can be managed by another user. After invoking this method, the spender (who has been given permission) will be able to make transfers of the owner's tokens within the updated amount. The method checks that the spender's address is not zero.

Parameters:

Name
Type
Description

spender

address

Token spender (disposer/manager)

addedValue

uint256

Number of tokens by which the resolution is increased

Returns values:

Name
Type
Description

result

bool

True of False

Method "allowance"

function allowance(address owner, address spender) public view virtual override returns (uint256)

The method returns the number of tokens the owner has allowed the spender to use.

Parameters:

Name
Type
Description

owner

address

Token owner

spender

address

Address of the token spender (disposer/manager)

Returns values:

Name
Type
Description

result

uint256

Number of tokens the holder has authorised the spender to use

Method "balanceOf"

function balanceOf(address account) public view virtual override returns (uint256)

The method returns the remainder of the tokens passed to the method address.

Parameters:

Name
Type
Description

account

address

The token owner

Returns values:

Name
Type
Description

result

uint256

Token balance

https://etherscan.io/
https://www.certik.org/projects/niftsy