/staking-contract

Smart contract for staking native tokens

Primary LanguageJavaScriptMIT LicenseMIT

Joys staking contract

Testing codecov Docs

Smart contract for staking native tokens

  • Lang: Solidity v0.6.12

  • Project framework: truffle v5.3.14 (core: 5.3.14)

  • Nodejs: v14.17.0

Overview

Deployed

  • Joys Digital Testnet: 0x6b371524c7168ed33A3F44f37117B307D78703c2
  • Joys Digital Mainnet: coming soon

Staking Dapp: https://staking.joys.digital/

Documentation

Project structure:

contracts
├── interfaces
│   ├── IJoysStaking.sol
│   ├── IStakeholder.sol
│   ├── IStakingMechanics.sol
│   └── IVault.sol
├── main
│   ├── JoysStaking.sol
│   ├── Stakeholder.sol
│   ├── StakingMechanics.sol
│   └── Vault.sol
├── mocks
│   └── StakeholderMock.sol
└── utils
    └── StakingOwnable.sol
  • interfaces/ - Interfaces for compatibility with other smart contracts

  • main/ - Main contracts

  • utils/ - Auxiliary contacts

How it works

architecture picture

Installation & Usage

  1. Install truffle

  2. Install all packages

npm i --save-dev

Build project:

npm run build

Testing

npm test

Test coverage

npm run coverage

Run linters

npm run lint

Deploy

edit network in truffle-config.js

truffle migrate --f 2 --network <network name>

License

MIT License