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
Parameters:
_owner
address
Address of the token factory owner
Token
createToken
createToken
Fills the token data taken from function params, creates token root address calling TokenRootUpgradable
, emits TokenCreated
event and onTokenRootDeployed
callback.
Parameters:
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
transferOwner
Takes new owner address, delegate it to the pendingOwner
and returns pendingOwner
(new owner address).
Parameters:
newOwner
address
Address of a new owner
Return Value:
address
Pending ownerβs address
acceptOwner
acceptOwner
If sender is pending owner, owner takes pendingOwner
address and returns it, meaning the new owner is accepted.
Return Value:
address
Address of the new owner
Code
setRootCode
setRootCode
Takes _rootCode
from function params, delegates it to rootCode
and returns it.
Parameters:
_rootCode
TvmCell
New token root code
setWalletCode
setWalletCode
Same as root.
Parameters:
_walletCode
TvmCell
New wallet code
setWalletPlatformCode
setWalletPlatformCode
Same as root.
Parameters:
_walletPlatformCode
TvmCell
New platform code for wallet
Upgrade
upgrade
upgrade
upgrades token to a new version with a new code taken from params.
Parameters:
code
TvmCell
New version code used for upgrading token
Key Events
TokenCreated
TokenCreated
Last updated