Solidity By Example
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
t4sk e9b97b6218 remove memo 2 weeks ago
.github/workflows move files 2 years ago
notes sol 0.8 notes 11 months ago
public fix flicker 9 months ago
scripts build routes 4 weeks ago
src update erc721 4 weeks ago
.gitattributes git attributes 4 years ago
.gitignore git ignore tmp 4 weeks ago
.prettierrc payment channel 2 years ago
LICENSE home 4 years ago readme 2 weeks ago
manifest.json publish 4 years ago
package.json build routes 4 weeks ago
tsconfig.json update npm 1 year ago

Solidity By Example


MIT License


## Deploy ##
# md to react
npx ts-node --project ./scripts/tsconfig.json scripts/md-to-react.ts src/pages/array

# md to react all pages
find src/pages -type d -not -path "*/__snapshots__" -exec npx ts-node --project ./scripts/tsconfig.json scripts/md-to-react.ts {} \;

# build routes
npx ts-node --project ./scripts/tsconfig.json scripts/build-routes.ts

# deploy
npm run deploy

## Compile Solidity ##
solc-select install 0.8.13
solc-select use 0.8.13

# compile single file
solc src/pages/hello-world/HelloWorld.sol

# find and compile sol
find src/pages/hacks -name "*.sol" solc {} \;
find src/pages -type f -name "*.sol" -exec sh -c 'solc "$0"' {} \;

## Mics ##
# rename files
find . -type f -name "index.test.js" -exec sh -c 'mv "$0" "${0%.test.js}.test.tsx"' {} \;