Gadgets are small and fun smart contracts.
I'm updating my Solidity and Vyper knowledge by updating and porting smart contracts I found interesting from around the internet.
Solidity contracts are in the src/
directory, and are using features and best practices from 0.8.27 (e.g. Custom Errors in require)
Vyper contracts are in the src/
directory, and are using features and best practices from 0.4.1
The smart contracts have their corresponding tests in the test/
directory.
Run forge test
to run the Solidity tests. (Foundry installation)
Run mox test
to run the Vyper tests. (Moccasin installation)
File | Description |
---|---|
CommunityChest.sol | An update to the smart contract from programtheblockchain's CommunityChest |
TipJar.sol | An update to the smart contract from programtheblockchain's TipJar |
Bank.sol | An update to the smart contract from programtheblockchain's Bank |
Savings.sol | An update to the smart contract from programtheblockchain's Savings |
Show which functions are not tested
forge coverage --report lcov && genhtml lcov.info -o coverage
Show which branches are not tested
forge coverage --report debug