=> uint) public balance; function mint (address receiver, uint amount) public returns(uint) { balance[receiver] += amount; return balance[receiver]; } } Decentralizing the Web with JavaScript - @ianaya89
# inits a new truffle project $ truffle compile # compile contracts and generate ABI $ truffle test # run test cases $ truffle migrate # deploy/migrate contracts to the blockchain Decentralizing the Web with JavaScript - @ianaya89
contract from 'truffle-contract' import abi from './Contratc.json' const provider = new providers.HttpProvider('http://localhost:8545') const MyContract = contract(abi) MyContract.setProvider(provider) Decentralizing the Web with JavaScript - @ianaya89