IdeaTokenFactory
The main task of the IdeaTokenFactory
is to manage the creation of new markets and IdeaTokens
and storing the parameters of such.
addMarket
: Adds a new market. This method may only be called by the admins.string marketName
: The name of the market (e.g. Twitter)address nameVerifier
: The address of theIdeaTokenNameVerifier
for this marketuint baseCost
: Bonding curve parameter, see bonding curve docs for more detailsuint priceRise
: Bonding curve parameter, see bonding curve docs for more detailsuint hatchTokens
: Bonding curve parameter, see bonding curve docs for more detailsuint tradingFeeRate
: The percentage trading fee collected on buy and sell operations. This value is denominated by10,000
, meaning to set a1%
trading fee the value100
should be passed here since100/10,000 = 1%
uint platformFeeRate
: Same as above, just for the platform feebool allInterestToPlatform
: If set totrue
all interest generated by the tokens in a market goes to the platform (e.g. Twitter) instead of being distributed to the owner of the individual token
addToken
: Adds a newIdeaToken
to a market. This method can be called by anyone.string tokenName
: The name for the tokenuint marketID
: The market id on which the token is to be listedaddress lister
: The account which is seen as lister of this token. Not stored in the contract, only emitted as event
When addToken
is called it is checked that the name for the token does not already exist for another token in that market and that the name is valid. The name validity check is performed by the IdeaTokenNameVerifier
which is unique to each market. If all checks are successful then a new MinimalProxy
contract is created which points to the IdeaToken
logic contract and ownership is transfered to the IdeaTokenExchange
.
Additionally the factory offers other utility functions to query market and token details and also three admin-only setters:
setTradingFee
: Changes the trading fee for a marketsetPlatformFee
: Changes the platform fee for a marketsetNameVerifier
: Changes theIdeaTokenNameVerifier
for a market
Last updated