Solidity Playground

garryplaysgarryplays New ZealandMember Posts: 5
Hi there, I just couldn't resist and created my own coin. It's not live yet, but I wanted to share the code anyway.
I created two gits. One for the solidity contract and one for the javascript webpage.

https://github.com/GarryPlays/garryscoin-solidity
https://github.com/GarryPlays/garryscoin-webtest

The hope is to give someone a good code snippet or inspiration on how to do, or not to do things. Since that's what I did, most of the code is from the ERC20 contract default with some tweaks to make it payable via ether and a max limit that is created on the go and not on creation.
And of course get some feedback from you guys. E.g. I removed the safeMath funtions since I just don't see any use for them, except cost more gas.
But maybe I am missing something.

Long live solidityyyyyy

All the way down the road Garrys can be swapped for creatures in our upcoming game, but that's fantasy for now.
At this point it's meant as a little sandbox to bring the use of ERC20 tokens to average people. Literally none of my friends understand them, I hope this page will help a little with that.

I'd also be curious as to how use anything but metamask to interact with the Ethereum chain. Let's say I want to buy Garrys using my ledger and myetherwallet. How could I do that? Besides from doing it manually.

Comments

  • garryplaysgarryplays New ZealandMember Posts: 5
    edited February 2018
    Alright, we have liftoff!
    Contract can be found at: 0x62Ad53f97d86C172024Cd3ac9c0B89B2Ee13E719
    And Garrys are available by a lot.

    However, I am trying to verify the code on etherscan, but I am getting all sorts of errors.
    Help :)
    I released it on Parity, it had optimized on, compiled against 0.4.18
    But etherscan keeps on erroring, I am lost.
    Post edited by garryplays on
  • garryplaysgarryplays New ZealandMember Posts: 5
    Ha, and already learned a valuable lesson. So hard when things are persistent.
    Anyway, improved the code ever so slightly so the contract owner can transfer Ethereum out of the contract.
    Unlike it was before, where every purchase of Garrys would result in an immediate transfer, which is not cost effective.
Sign In or Register to comment.