Slides: https://uri.im/ethppt
Speaker: Shubhamoy (GitHub)
Linting is essential when you are writing such code, as there was an instance of DAO Attack which caused a theft of millions. As the contracts are publically available, it is easy for attackers to find potential vulnerabilities.
daksh@Dakshs-MacBook-Air ~/Desktop/blockchain101 master npm i -g solium
/usr/local/bin/solium -> /usr/local/lib/node_modules/solium/bin/solium.js
> [email protected] install /usr/local/lib/node_modules/solium/node_modules/fsevents
> node install
[fsevents] Success: "/usr/local/lib/node_modules/solium/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile
+ [email protected]
added 331 packages from 423 contributors in 14.673s
daksh@Dakshs-MacBook-Air ~/Desktop/blockchain101 master solium --init
daksh@Dakshs-MacBook-Air ~/Desktop/blockchain101 master ● solium --file contracts/SmartWallet.sol
contracts/SmartWallet.sol
20:8 warning Provide an error message for require(). error-reason
24:23 warning Visibility modifier "public" should come before other modifiers. visibility-first
25:8 warning Provide an error message for require(). error-reason
40:8 error Avoid using Inline Assembly. security/no-inline-assembly
57:12 warning Provide an error message for revert(). error-reason
✖ 1 error, 4 warnings found.
✘ daksh@Dakshs-MacBook-Air ~/Desktop/blockchain101 master ● git status
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
Untracked files:
(use "git add <file>..." to include in what will be committed)
.soliumignore
.soliumrc.json
no changes added to commit (use "git add" and/or "git commit -a")
- Smart Wallet Contract Barebone
- Final Version of Contract
- Migration Script
- Nice URL Shortener: https://uri.im/