Git Product home page Git Product logo

erc20_stakingcontract's Introduction

ERC20_StakingContract

where user stakes his ERC20 tokens . after 4 weeks of deposit user gets 5% APR , after 6 months gets 10% APR and after 1 year gets 15% APR.

For staking before calling the function "stakeTokens" , you need to approve staking or greater amount for the contract address, so that it can transfer the token amount from your account to it's own account.Otherwise it'll revert the transaction.

for stake withdrawal use the function "withdrawStake" with a given stake index and tokenBits Amount.

the contracts is deployed at rinkeby network

  1. staking contract 0x3bAE1256663b43e503aee0F01e0Be2F0d93db73F . contract is verified . etherscan link

  2. ERC20Token contract 0x65FB172158b7C09946Be0CF99177108cc2983b67 . contract is verified . etherscan link

To Deploy the contracts

for rinkeby network

  1. configure hardhat.config.js

  2. run :- npx hardhat run scripts/deploy.js --network rinkeby

To run the tests for staking contract

  1. run:- npx hardhat test (from root directory)

erc20_stakingcontract's People

Contributors

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