VLM ERC 20 Contract
Variables:
preSalePrice
The preSale price in Matic.
constant
pubSalePrice
The Public Sale price in Matic.
constant
SaleSupply
The supply available for sale.
constant
PreSale
True if the presale stage is active.
Contract
PublicSale
True if the public sale stage is active.
Contract
SeedMinting
True if the Seed distribution is active.
Contract
SaleStart
The blocktime of the deployment of the contract.
constant
Factory
The factory contract address.
Factory
DevFunds
The Development funds address.
constant
LiquidityFunds
The liquidity funds address.
constant
MarketingFunds
The marketing funds address.
constant
_paymentsMatches
How many matches is required to mint seed payment.
constant
_matchPayment
A counter for match payments since the last reset.
Contract
_seedIds
A counter for how many seeders we have.
contract
_payments
A counter for how many seed payments we released.
contract
SeederList
A list of seeders accounts
Contract
SeederBalance
A list of seeders balances
contract
Functions:
buyToken
Access: public, accept payments.
Arguments: amount of tokens, referral address
Usage: Allow users to buy Locked Seed VLM tokens to fund the project.
Requirements:
an active Presale or Public sale.
The sale end deadline didn't pass.
The amount of token is less than or equal the seed supply.
The payment amount equals the number of tokens multiplied by the price.
Conditions:
The referral address must be in the seeder list to count.
At the 100 seeder, the stage changes from PreSale to Public sale.
The price changes according to the active stage.
If the supply is 0 the sale ends.
Outputs:
add the token amount to the seeder balance
remove the token amount from the seed supply
transfer 50% of the payment to liquidity funds
mint 50% of the token amount to liquidity funds
transfer 25% of the payment to devFunds
transfer 25% of the payment to marketing Funds.
matchMint
Access: public, external. access limited to the factory contract
Arguments: list of players' addresses, list of players' reward amounts
Usage: Used by the factory contract to distribute rewards to the server and players and trigger the seed payments.
Requirements:
The sender must be the factory contract.
Conditions:
1. triggers Seed payments if the seedMinting is true
seederPayments
Access: internal
Usage: Distribute 1% of the total amount of the seeders, if the seeder balance is less than 10000 VLM the function release all the balance and marks the seeder as paid. If the payments reach 100%, this function won't be executed anymore.
Requirements:
The seeder must have an unpaid state.
Output:
Mint the 1% to the seeder balance.
getSaleInfo
Access: public, view.
Returns the list of useful information about the sale price, state, and available amount.
GetVestedBalance
Access: public, view
Returns the current vested balance of the sender.
SetFactory
Access: external, access limited to the factory contract
set the factory address to a new contract in case of an update.
Last updated