Giter Club home page Giter Club logo

0xpuddi / qd-validator-contracts Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 286 KB

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.

License: MIT License

Solidity 88.02% JavaScript 11.98%
avalanche-c-chain solidity validator

qd-validator-contracts's Introduction

Quarry Draw Validator Contracts

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.*

Installation

  1. Clone this repo:
git clone [email protected]:Puddi1/QD-Validator-Contracts.git
  1. Install NPM packages:
cd QD-Validator-Contracts
npm i

Compile

To compile the contracts in ./contract run:

npx hardhat compile

Their artifacts will be placed in ./artifacts/contracts

Tests

To run test, which are stored in ./test run:

npx hardhat test

Tests Coverage

To see tests coverage run:

npx hardhat coverage

Deployment

Before deployment you should enter necessary environment variables, such as:

  • FUJI_URL is the Fuji RPC url
  • AVAXMAINNET_URL is the Avalanche (C-Chain) RPC url
  • PRIVATE_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

qd-validator-contracts's People

Contributors

0xpuddi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.