Examples for getting started as an Ethereum web developer
To get this set up, clone the repo, run npm install
, and then run npm run keygen test && npm run keygen test2
to generate
some test keypairs .You will need truffle and mocha installed globally.
This is a basic test just showing you how contracts are deployed and how you can interact with them using an Ethereum ABI definition and a private key:
npm run test
To simulate this attack on an ERC20 token:
npm run attack
To initialize and run a few tests against a basic payment channel:
npm run channels
Here are a few FAQs:
When deploying contracts, I get: Error: sender doesn't have enough funds to send tx
You have probably run out of funds on accounts[0]
. The easiest way to get rid of this error is to reboot testrpc.