FlatQube
▶️ App🔩 Sources💬 Community🔒 Audit
  • Welcome to FlatQube
  • 👨‍💻Use
    • Getting started
      • How it works
      • Roles
      • How to connect a wallet
      • Glossary
      • Everscale
      • How to get EVER
    • Swap
      • Interface
        • Basic swap
      • How to
        • Make a basic swap
        • Use limit trading
        • Configure slippage tolerance
        • Use cross-exchange
      • Concepts
        • Limit orders
        • Slippage tolerance
        • Fees
        • Price impact
        • Cross-exchange
    • Tokens
      • Interface
        • All tokens
        • Token page
          • Price
          • TVL
          • Trading volume
          • Pairs
          • Transactions
          • Open in explorer
      • How to
        • Upgrade token(s)
        • Add custom token
      • Concepts
        • Tokens we use
        • EVER and wEVER
        • Token lists
    • Pools
      • Interface
        • All pools
        • Pool page
      • How to
        • Connect DEX account
        • Add liquidity (Get LP tokens) / Withdraw liquidity
        • Create a new pool
        • Calculate the amount of LP tokens
      • Pool economics
    • Farming
      • New farming
        • Interface
          • Farming pools
          • Farming page (user)
            • Farming performance and deposits
            • Statistics
            • Farming speed and vesting
            • Transactions
          • Farm page (administrator)
        • How to
          • Claim reward
          • Deposit/Withdraw farm tokens
          • Get a boost
          • Create and manage your farming pool
      • Old farming
        • Interface
          • Farming pools
          • Farm page (user)
            • Farming perfomance and balances
            • Statistics
            • Farming speed
            • Farm information
            • Transactions
          • Farm page (administrator)
        • How to
          • Claim reward
          • Deposit farm tokens
          • Withdraw farm tokens
          • See farming performance
          • Find my transactions
      • Concepts
        • Yield farming
        • Reward distribution
        • Vesting
        • Farming token
        • Boosted farming
        • Pool share
    • DAO
      • Interface
        • DAO page
        • DAO balance
        • Epoch
      • How to
        • Lock tokens
        • Vote in Epoch
        • Get a boost
        • Become a candidate
      • Concept
        • DAO
        • veQUBE
        • Epoch
        • Boosted farming
        • FAQ
    • Token builder
      • Interface
        • Explorer
        • Token page
      • How to
        • Create new token
        • Mint tokens
        • Burn tokens
        • Transfer ownership
  • ⚒️Integrate
    • Open API
      • FlatQube DEX Indexer
        • CMC API
        • Currencies API
        • Pairs API
        • Transactions API
      • FlatQube Farming Indexer
        • Farming pools API
        • Transactions API
        • Graphics API
    • Smart contracts
      • DexAccount
      • DexPair
      • DexPlatform
      • DexRoot
      • DexVault
      • DexVaultLpTokenPending
      • EverToTip3
      • EverWeverToTip3
      • Tip3ToEver
      • TokenFactory
  • ↗️See also
    • EVER Wallet
    • Octus Bridge
    • Platform products
    • Broxus Github
Powered by GitBook
On this page
  • constructor
  • Token
  • createToken
  • Owner
  • transferOwner
  • acceptOwner
  • Code
  • setRootCode
  • setWalletCode
  • setWalletPlatformCode
  • Upgrade
  • upgrade
  • Key Events
  • TokenCreated

Was this helpful?

  1. Integrate
  2. Smart contracts

TokenFactory

The TokenFactory smart contract is used for deploying tokens, sets wallet, root, platform codes and managing ownership.

Smart contract responsible for deploying tokens, sets wallet, root, platform codes and managing ownership.

Derives following classes and interfaces: ITokenFactory, IUpgradable.

constructor

constructor(address _owner) public

Parameters:

Name
Type
Description

_owner

address

Address of the token factory owner

Token

createToken

function createToken(uint32 callId, string name, string symbol, uint8 decimals, address initialSupplyTo, uint128 initialSupply, uint128 deployWalletValue, bool mintDisabled, bool burnByRootDisabled, bool burnPaused, address remainingGasTo) public override

Fills the token data taken from function params, creates token root address calling TokenRootUpgradable, emits TokenCreated event and onTokenRootDeployed callback.

Parameters:

Name
Type
Description

callId

uint32

ID of the operation call

name

string

Token name

symbol

string

Token symbol

decimals

uint8

Number of decimals

initialSupplyTo

address

Address which will hold initial supply of newly created token

initialSupply

uint128

Number of tokens initially available

deployWalletValue

uint128

Value necessary for deploying new token’s wallet

mintDisabled

bool

True if minting is disabled, false if not

burnByRootDisabled

bool

True if burn is disabled, false if not

burnPaused

bool

True if burn is paused, false if not

remainingGasTo

address

Address where to store remaining gas after creating token root

Owner

transferOwner

function transferOwner(address newOwner) external responsible onlyOwner returns(address)

Takes new owner address, delegate it to the pendingOwner and returns pendingOwner (new owner address).

Parameters:

Name
Type
Description

newOwner

address

Address of a new owner

Return Value:

Type
Description

address

Pending owner’s address

acceptOwner

function acceptOwner() external responsible returns(address)

If sender is pending owner, owner takes pendingOwner address and returns it, meaning the new owner is accepted.

Return Value:

Type
Description

address

Address of the new owner

Code

setRootCode

function setRootCode(TvmCell _rootCode) public onlyOwner

Takes _rootCode from function params, delegates it to rootCode and returns it.

Parameters:

Name
Type
Description

_rootCode

TvmCell

New token root code

setWalletCode

function setWalletCode(TvmCell _walletCode) public onlyOwner

Same as root.

Parameters:

Name
Type
Description

_walletCode

TvmCell

New wallet code

setWalletPlatformCode

function setWalletPlatformCode(TvmCell _walletPlatformCode) public onlyOwner

Same as root.

Parameters:

Name
Type
Description

_walletPlatformCode

TvmCell

New platform code for wallet

Upgrade

upgrade

function upgrade(TvmCell code) public override onlyOwner

upgrades token to a new version with a new code taken from params.

Parameters:

Name
Type
Description

code

TvmCell

New version code used for upgrading token

Key Events

TokenCreated

TokenCreated(address tokenRoot);
PreviousTip3ToEver

Last updated 2 years ago

Was this helpful?

⚒️