Quickstart Commands
Run this command to install dependencies, compile contracts, and execute all tests:
make
Create a .env file in the project directory.
In the .env file, provide the following environment variable by replacing with your RPC URL. For example:
<YOUR_ENV_RPC_VARIABLE_NAME>=<url>
Running the Test Suite Now that you've set up your environment variables, follow these steps to run the test suite: In the terminal, run the following commands:
source .env
forge test --fork-url $<YOUR_ENV_RPC_VARIABLE_NAME>
To run specific test suites, use:
forge test --match-path "test/Soulbound.t.sol"
To generate coverage reports, first install genhtml:
brew install genhtml
Note: If you encounter the error No available formula with the name "genhtml". Did you mean ekhtml?, run the following command:
brew install lcov
Finally, generate the coverage report with:
yarn run coverage
The Solidity smart contracts are located in the src
directory.
├─ AntiBotERC20 — "Prevent frontrunner bots from performing sandwich attacks"
├─ BasicERC721 — "Simple ERC721 contract"
├─ BasicERC1155 — "Simple ERC1155 contract"
├─ CrowdFunding — "Crowdfunding contract"
├─ FixedERC20 — "Fixed supply ERC20 contract"
├─ RentableNFT — "Rent out NFTs for a specified period"
├─ RaffleRegistry — "Manage assets for third party raffles"
├─ StakingCooldownSilo — "Securely store staking tokens during cooldown period"
├─ SoulboundNFT — "Single mint, non-transferable NFT contract"
upgradable/
├─ FreeMintERC721 — "Single free mint per address ERC721 contract"
├─ MembershipCards — "NFT membership cards contract"
├─ UserEngagementRegistry — "Register games and track user interactions"
Explore my Solstack GitBook Documentation for detailed information on each contract and its functionalities.
src — "Solidity smart contracts"
test — "Foundry Forge tests"
I do not give any warranties and will not be liable for any loss incurred through any use of this codebase.
Please always include your own thorough tests when using Solstack to make sure it works correctly with your code.
This repository is inspired by or directly modified from many sources, primarily: