The Validator is the key of QuarryDraw ecosystem. The validator represent an Avalache Mainnet Validator Node, it is a contract that sells stakes of the validator, which is then run by the QuarryDraw team. Rewards are then distributed to active users based on their holdings without any stake needed, thus shares are completely liquid.
This project uses a gas-optimized reference implementation for EIP-2535 Diamonds. To learn more about this and other implementations go here: https://github.com/mudgen/diamond
This implementation uses Hardhat and Solidity 0.8.*
- Clone this repo:
git clone [email protected]:Puddi1/QD-Validator-Contracts.git
- Install NPM packages:
cd QD-Validator-Contracts
npm i
To compile the contracts in ./contract
run:
npx hardhat compile
Their artifacts will be placed in ./artifacts/contracts
To run test, which are stored in ./test
run:
npx hardhat test
To see tests coverage run:
npx hardhat coverage
Before deployment you should enter necessary environment variables, such as:
FUJI_URL
is the Fuji RPC urlAVAXMAINNET_URL
is the Avalanche (C-Chain) RPC urlPRIVATE_KEY
is the private key of the wallet you wish to deploy contracts with
See .env.example for syntax examples.
Deployments scripts are handled in ./scripts
, to deploy in Fuji testnet:
npx hardhat run scripts/deployTestnet.js --network Fuji
To deploy in Avalanche mainnet:
npx hardhat run scripts/deployTestnet.js --network AvalancheMainnet