Message lingqingmeng
in Slack or on telegram https://t.me/lingqingmeng
- Break down functionality in small modular chunks, this way you are able to know exactly where the bug arises. Verify the success case works (positive test)
- Ask questions early and often. It takes 10x longer to google something than it takes to ask one of us the question in Slack and get the answer - or any other student can also answer.
- Make sure your version is up to date. I would recommend 4.18 or 4.24 for Solidity.
- I would recommend web3 1.0.0. Documentation is very different and they are not backwards compatible. web3 0.20 documentation, very different than web3 1.0.0 documentation
- Recommend Solidity pragma 4.18 or 4.24.
- This is my truffle version running on OSX
truffle version
Truffle v4.1.11 (core: 4.1.11)
Solidity v0.4.24 (solc-js)
- Async operations. Javascript both in client and server is asynchronous. There are 3 ways to do asyncSome documentation uses callbacks, promises and async/await.
- Async await will take you the longest to get up and running, you will need version nodejs version 8.5 or 10, and you will need babel to use ES7 code in backend.
- Get Infura to deploy to mainnet node, if you want to do most of the coding in Sublime/Visual Studio instead of Remix, you will need Infura and Truffle hd Wallet. Infura and Truffle HD Wallet
- To minimize gas, favor view or pure functions over mutating global state. Functions that write to blockchain globally. The web3 api has a method to estimate gas used in any method
web3.eth.estimateGas
. - Setting up your own Geth or Parity node is not recommended
- gas: also known as
gas
orgasLimit
. This is the maximum amount of gas that can go into a transaction. (how much volume your car's fuel tank has) - gasPrice: also known as
gasPrice
. This is the price - Get comfortable converting between hex and numbers. Favor web3 provided methods over trying to reinvent the wheel. Good examples from official ethereum developers
- Many different conventions in how you import in a Solidity from other solidity files, vs how you import a Solidity file in a Javascript file. Don't make assumptions and ask questions as early as possible in Slack on how to properly import.