#
ITokenFactory
Matt Stam (@mattstam)
ITokenFactory
Clone factory for deploying token clones (minimal proxies of IToken
).
https://blog.openzeppelin.com/workshop-recap-cheap-contract-deployment-through-clones/ Only CREATE2 / deterministic creation is supported, since in the Git Consensus Protocol the addresses should be predicted ahead of time.
#
Methods
#
createToken
function createToken(address govAddr, address minterAddr, string name, string symbol, uint256 _maxMintablePerHash, address[] owners, uint256[] values, bytes32 salt) external nonpayable returns (address instanceAddr)
Creates an IToken
with an optional initial distribution. Uses CREATE2 so that the token's address can be computed deterministically using predictAddress().
#
Parameters
#
Returns
#
predictAddress
function predictAddress(bytes32 salt) external view returns (address instanceAddr)
Predicts the address of an IToken
deployed using CREATE2 + salt value.
#
Parameters
#
Returns
#
Events
#
TokenCreated
event TokenCreated(address instanceAddr, address creatorAddr, address govAddr, address minterAddr, string name, string symbol, uint256 maxMintablePerHash)