Coder Social home page Coder Social logo

mariesnlk / staking-impl Goto Github PK

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

This repository is an example of different implementations of staking that I am proud of

License: MIT License

Shell 0.21% JavaScript 0.06% Solidity 39.86% TypeScript 59.88%

staking-impl's Introduction

SC Library

This project presents Staking based on timestamp with core functionalities and it's different implementations.


How to clone project?

Clone or fork from Bitbucket applicature/sc-library:

git clone [email protected]:applicature/sc-library.git

How to set up project?

Install all dependencies:

npm install 

You should get node_modules folder and package-lock.json

Rename .env.example to .env in the main folder and provide your keys

INFURA_KEY= xxxxxxxxxxxxxxxxxx
INFURA_KEY="17425404118d470ab61c1cded765a510"

How to deploy and verify contracts?

Deploy contracts is possible wih tasks or with hardhat scrip. Before that in .env file should be added PRIVATE_KEY from your MetaMask wallet and one of API key of the blockchain

POLYGONSCAN_API_KEY=
ETHERSCAN_API_KEY=
BSC_API_KEY=

To run with hardhat:

npx hardhat run --network <your-network> scripts/deploy.js
npx hardhat verify --network <your-network> <address-deploy-contract> [<param> <param>]

To run with tasks:

  • to see all tasks
npx hardhat
  • to see all tasks
npx hardhat <task-name> [--<verify>]

How to run tests?

To run all tests at one time:

npx hardhat test

To run only selected files add in files with tests you want to run before describe .only - describe.only


How to run tests coverage?

To run tests coverage:

npx hardhat coverage

How to run gas reporter?

To run gas reporter in hardhat.config.ts add currency that you ant to know price in. In .env set keys with values:

MAINNET_GAS_PRICE=0.02
COINMARKETCAP_API_KEY="b54bcf4d-1bca-4e8e-9a24-22ff2c3d462c"
RUN_TESTS_WITH_REPORTER=true

staking-impl's People

Contributors

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