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(address _owner) public
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
function transferOwner(address newOwner) external responsible onlyOwner returns(address)
Takes new owner address, delegate it to the
pendingOwner(new owner address).
function acceptOwner() external responsible returns(address)
If sender is pending owner, owner takes
pendingOwneraddress and returns it, meaning the new owner is accepted.
function setRootCode(TvmCell _rootCode) public onlyOwner
_rootCodefrom function params, delegates it to
rootCodeand returns it.
function setWalletCode(TvmCell _walletCode) public onlyOwner
Same as root.
function setWalletPlatformCode(TvmCell _walletPlatformCode) public onlyOwner
Same as root.
function upgrade(TvmCell code) public override onlyOwner
upgrades token to a new version with a new code taken from params.