Introduction
This repository contains the solidity smart contracts for the Garden Finance project. These contracts are designed to facilitate payment channels, HTLCs, and staking functionalities within the ethereum ecosystem.
Smart Contract Breakdown
The contracts are organized into the following directories, each containing related functionalities:
- Contracts:
- Flower.sol: This contract Follows ERC721 NFT standard and is responsible for minting Flower NFTs.
- SEED.sol: This contract follows ERC20 standard and is the base token used across all garden decentralized applications.
- fee:
- FeeAccount.sol: This contract is used to manage the funds of a channel between a funder and a recipient using
Payment Channel
Architecture along withHTLC
. - FeeAccountFactory.sol: This contract is used to deploy and manage the fee channels per signer.
- FeeAccount.sol: This contract is used to manage the funds of a channel between a funder and a recipient using
- htlc:
- HTLC.sol: This contract is used to settle an order which is committed offchain.
- stake:
- BaseStaker.sol: Serves as Base Class for GardenStaker, Contains all State for FillerManager and DelegateManager.
- DelegateManager.sol: This contract is responsible for managing the delegation of voting power to fillers.
- FillerManager.sol: This contract is responsible for managing the fillers.
- GardenStaker.sol: Acts as Entry point for staking functionalities.
- Hardhat
- Solidity
- Node >= 20
- Slither [https://github.com/crytic/slither]
- Uses TypeChain
Getting Started
For developers familiar with Hardhat and Solidity, follow these steps to set up the development environment:
-
Install dependencies:
yarn install
-
Compile the contracts
npx hardhat compile
-
Run the tests:
npx hardhat test
This project is licensed under the MIT License.