- contracts: Subdirectory containing all Snickerdoodle Protocol smart contracts
- docs: Auto-generated API documentation of public and external contract methods
- scripts: Hardhat scripts for deploying different configurations of the smart contract stack
- subnets: A subdirectory containing configurations for launching local, testnet, and mainnet Avalanche Subnets
- tasks: Hardhat task definitions for interacting with smart contract deployments
- test: Hardhat unit tests for the Snickerdoodle Protocol smart contract stack
- hardhat.config.js: Configuration file for the Hardhat development framework
The Snickerdoodle Contracts stack consists of the following primary components:
Contains an upgradable EIP721 compatible NFT implementation and an associated contract factory.
Contains an EIP20 compatible token, wrapper token (for subnet deployments), and a vesting contract.
Contains an EIP721 compatible registry contract for storing Snickerdoodle account recovery details.
Contains the implementation of the Snickerdoodle Protocol governance DAO.
Steps to install and run this project this locally:
git clone https://github.com/SnickerdoodleLabs/protocol.git
cd protocol
yarn install
Use Hardhat to compile the protocol contracts like this:
cd /packages/contracts
yarn compile
yarn test
This command will create a subdirectory called artifacts
which will contain the contract ABI and bytecode for all contracts in the contracts
subdirectory.
A pre-built docker image for local development against the contract stack is available at
snickerdoodlelabs/devchain
.
Run a local subnet like this:
docker run -d -p 8545:8545 --rm snickerdoodlelabs/devchain
Run a Hardhat node like this:
docker run -d -p 8569:8569 --name devchain --rm --env NETWORK=dev snickerdoodlelabs/devchain
A list of Snickerdoodle Protocol contract addresses can be found here.