This repository contains all the implementation contracts of various use cases that I have built or experimented with. Navigate to the different branches to check the contract implementation and play with the contracts using Scaffold Eth UI
Note: Few of the contracts implemented here are only for learning purposes and might not be production ready. For those contracts, all the security best practices may or may not be followed due to time constraints.
- Perpetual Futures smart contract (USDT Market) - Click Here
- Simple Decentralized Exchange Contract - Click Here
- Token Vesting (Cliff and Linear) - Click Here
- Staking Rewards (ERC20) - Click Here
- DAO/Governance contract - Click Here
- Game Registry Contract - Polygonscan
- Tournament Contract - Polygonscan
- Game Inventory Contract - Louper.dev
- Account Abstraction Transaction Flow: Click Here
- Smart Contract Wallet and Entry point contracts: Click Here
- LayerZero Omnichain ERC20 token with Governance support: Click Here
- Arcadians Dynamic NFT Collection (ERC721) - Louper.dev
- Equippable Cosmetics and Gears Collection (ERC1155) - Louper.dev
- CryptoChillouts NFT collection (ERC721) - Polygonscan
- Arcadians NFT Points with ERC6551 support - Click Here
- Arcadian NFT Soul bound badges with ERC6551 support - Click Here
- Basic Diamond Proxy Contract (EIP-2535) - Click Here
- Advanced Diamond Proxy Contracts - Check GameFi section -> Game Inventory Contract & NFT section -> Arcadians NFT Collection and Equippable Cosmetics and Gears Collection
- Assembly (Using YUL) - Click Here
Before you begin, you need to install the following tools:
- Node (v18 LTS)
- Yarn (v1 or v2+)
- Git
To get started with Scaffold-ETH 2, follow the steps below:
- Clone this repo & install dependencies
git clone https://github.com/scaffold-eth/scaffold-eth-2.git
cd scaffold-eth-2
yarn install
- Run a local network in the first terminal:
yarn chain
This command starts a local Ethereum network using Hardhat. The network runs on your local machine and can be used for testing and development. You can customize the network configuration in hardhat.config.ts
.
- On a second terminal, deploy the test contract:
yarn deploy
This command deploys a test smart contract to the local network. The contract is located in packages/hardhat/contracts
and can be modified to suit your needs. The yarn deploy
command uses the deploy script located in packages/hardhat/deploy
to deploy the contract to the network. You can also customize the deploy script.
- On a third terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000
. You can interact with your smart contract using the contract component or the example ui in the frontend. You can tweak the app config in packages/nextjs/scaffold.config.ts
.
Run smart contract test with yarn hardhat:test
- Edit your smart contract
YourContract.sol
inpackages/hardhat/contracts
- Edit your frontend in
packages/nextjs/pages
- Edit your deployment scripts in
packages/hardhat/deploy