Quickstart Commands
Run this command to install dependencies, compile contracts, and execute all tests:
makeCreate a .env file in the project directory.
In the .env file, provide the following environment variable by replacing with your RPC URL. For example:
<RPC_URL>=<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 $<RPC_URL>To run specific test suites, use:
forge test --match-path "test/Soulbound.t.sol" --fork-url $RPC_URL
or
forge test --match-path "test/upgradeable/ShardsRWA/*.t.sol" --fork-url $RPC_URLTo generate coverage reports, first install genhtml:
brew install genhtmlNote: If you encounter the error No available formula with the name "genhtml". Did you mean ekhtml?, run the following command:
brew install lcovFinally, generate the coverage report with:
yarn run coverageThe 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"
├─ Create2Factory — "Deterministic contract deployments"
├─ 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"
upgradeable/
├─ FreeMintERC721 — "Single free mint per address ERC721 contract"
├─ FreeMintRegistry — "ERC1155 free mint registry contract"
├─ MembershipCards — "NFT membership cards contract"
├─ UserEngagementRegistry — "Register games and track user interactions"
├─ ShardsRWA — "Fractional ownership of NFTs"
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:
