mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jrosendo
7a960f7d00
|
2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago |
README.md
Token Sale
One way to distribute our token is to sell it. We will set a fixed price for each token. The tokens will have to be send to the Smart Contract by their owner initally.
Instructions
-
Create a Smart Contract
TokenSale
-
The contract imports MinimalToken
-
Create a
constructor
function that takes as parameter the address of a deployedMinimalToken
and the price of a token (in wei). -
Create a public payable function
buy()
that sends to the buyer token proportionally to the value send. -
Create a public function
getPrice()
that returns the price of the token. -
Create a public function
collect()
that allows the initial deployer of the contract to collect the proceedings from the sale