I finally finished debugging the ERC20 balance coin front end. This was just a proof of concept experiment to create a ERC20 contract and create a web interface (dapp).
Balance coin is not really a fully fleshed out idea but a vehicle for me to build a dapp. Here is the dapp and the code. It needs cleaning and linting, beautification (because I really dont know material-ui) and the meditate and social media buttons need work BUT you can send balance.
That said – I was kinda thinking about sweatcoin and how it would be interesting to have a coin that gained value the more balance you had (ie mindfulness/mental clarity/ that kind of thing). To that extent, you can add to your own supply of balance (and total supply balance) by doing mindful things such as meditation, and lose balance by doing not so mindful things (e.g., dopamine hits on social media). You can also transfer balance coins to other people. It developing the dapp I discovered a bunch of ways the contract was unstable – so I should probably update that – but I am moving on to NFTs since that is the crux of the prayer blockchain.
This all runs on the ropsten test network as I mentioned in a previous blog. The code needs to be formated and linted but it is pretty simple so anyone can take a look and see how to build their own dapp. One of the things I would like to do now is a code generator to create dapps.
My main issue was that I was using web3 1.0.0-beta.41 and there was a bug and I had to downgrade to 1.0.0-beta.37. This took about 5 hours to figure out, but I did become very proficient at using the truffle console to examine tokens!