Git Product home page Git Product logo

nft-erc1155staking's Introduction

ERC1155 staking contract

Description :- This contract helps to stake any ERC1155 NFT . it takes two contract address as constructor argument, one is ERC1155NFT contract and another is ERC20 token contract (as the staking contract gives ERC20 as a staking reward).Minimum amount of NFT you can stake is 100 in this contract. User can stake their ERC1155 token , as a staking reward user will get ERC20 tokens (ROI:- 1month=5%APR,6month = 10% APR , 1Year = 15% APR) .

The staking contract is deployed with some ERC20 tokens.

NOTE :- 1. It'll work on any type of ERC20 token, as long as the decimal value is 18. 2. Before staking any token first Approve this contract as a operator, otherwise your transaction will be reverted.

the contracts is deployed at rinkeby network

  1. ERC1155Token contract 0xC34525E0D7188fdA211D27b349B7364933C3AC89 .

contract verified etherscan

  1. ERC20TOken contract 0xce07a94F963B3f7309BC008f5D729c0d8a349055 .

contract verified etherscan

  1. Staking address 0xa86450AEa8e4cF2Ff9942757eA2382CdD3272948 .

contract verified etherscan

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

All the tests for this staking contract written in test/NFTERC1155Staking.js file.

to run the tests,

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

NOTE:- Do not forget to change the time period from days to seconds in "_calculateROI" function in NFTERC1155Staking.sol file , otherwise last test will fail

nft-erc1155staking's People

Contributors

subhajitdas1999 avatar

Stargazers

QTM Oracle 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.