Hello dear Eth community,
I am a complete noob, please go easy on me đ I am an IT teacher and I want to create a reward system for my class for a game that we play weekly. The game is not blockchain related – basically it is a quiz which when solved would open an ethereum address and an amount of ETH to sent to the address. E.g. âAddress is 0x337hj377v..; you can now transfer 2ETH to get your âgame reward tokensâ.
Once individual sends that ETH, he receives back the appropriate amount of game tokens e.g. 1eth = 0.1 game tokens.
We then count who collected the most and determine the winner.
Again, I am completely new to developing smart contracts and I have some challenges.
I am working on a test net and already created my âgame reward tokensâ.
Next what I am struggling to do is to create a smart contract which would accept my âgame reward tokensâ and then would send it to users, to whoever is sending ETH, lets say 1ETH = 10 âgame reward tokensâ.
So âgame reward tokensâ >> moved to smart contract address >> sits there until someone sends the ETH. If 1eth sent from address x >> 10 game reward tokens sent to address x.
Is there a change anyone could help me out? Maybe there already were similar discussions and you could point me there.
Would appreciate any suggestions,
Cheers!
Best Answer
If you try to run the smart contract on this website Crowdsale In this process you have to build the erc20 token in 1st step and then 2nd step crowdsale , transafer some coins to this crowdsale contract.Anyone send the eth to this crowdsale contract will get the tokens.