Hey all! This repo was used in a presentation as a quick introduction to Solidity and Smart Contracts. This is intended to be a basic tutorial, as such it doesn't use an Ethereum development framework like Truffle.
Instead it makes use of gulpjs as a simple build system as well as solc-js, mochajs and web3-js to run tests in (...you guessed it!) JavaScript.
If you're looking for an interactive walkthrough of this material, check it out on Codecast.
If you'd like to see the original talk that went along with this repo it's available on YouTube.
Otherwise, if you're looking to run this code locally follow these instructions:
Install all the dependencies using NPM by running npm install
at the root level of this repo.
Run gulp watch
to watch anytime your contract changes and automatically update your ChuckETHCheese.json
file with the
updated ABI and bytecode.
Install ganache-cli globally by using npm install -g ganache-cli
if you haven't done so already. Then use ganache-cli
to run it locally.
You should see a list of accounts in the ganache-cli output. Select any two and replace the addresses in the test/tests.js
.
Now you can use mocha
from the root directory to test your Solidity Contract.
Feel free to start from scratch and try to pass all the test cases or write your own!
Looking to start your next dApp? Check out ChainShot (www.chainshot.com) for an in-browser walkthrough that sets you up with your own working dApp at the end!