Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muffin819/staking-reward-solidity
We built a Staking Rewards smart contract, that makes users stake some tokens and get another token as a reward for locking their token in the smart contract.
https://github.com/muffin819/staking-reward-solidity
defi ethereum reward solidity staking
Last synced: 13 days ago
JSON representation
We built a Staking Rewards smart contract, that makes users stake some tokens and get another token as a reward for locking their token in the smart contract.
- Host: GitHub
- URL: https://github.com/muffin819/staking-reward-solidity
- Owner: muffin819
- License: mit
- Created: 2024-11-01T18:42:10.000Z (14 days ago)
- Default Branch: master
- Last Pushed: 2024-11-01T18:47:10.000Z (14 days ago)
- Last Synced: 2024-11-01T19:29:25.913Z (14 days ago)
- Topics: defi, ethereum, reward, solidity, staking
- Language: TypeScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Staking Rewards Solidity Contract
Table of Contents
## About The Project
Staking tokens are useful in a lot of DeFi projects, where people can lock their tokens in a protocol, and they gain a number of tokens as a reward for providing their stake tokens to the protocol. The protocol can make use of these tokens for many purposes.
We built a `Staking Rewards` smart contract, that makes users stake some tokens and get another token as a reward for locking their token in the smart contract.
We used blockchain technology, the Ethereum network, and smart contract development technology to achieve our goal.
The smart contract is written in [solidity](https://soliditylang.org/), and we used JS/TS to test and interact with the contract.
### Built With
The smart contract is built using hardhat framework, ethersjs, and some other packages and dependencies that speed up in development process.
* [![Soliditylang][Solidity]][Solidity-url]
* [![Hardhat][Hardhat]][Hardhat-url]
* [![Openzeppelin-contracts][Openzeppelin]][Openzeppelin-url]## Getting Started
This is an example of how to run the smart contract locally on your computer.
### Prerequisites
You need to check if nodejs and npm are installed on your computer first.
```sh
npm --version
``````sh
node --version
```If you don't have node, you can install it from there [official website](https://nodejs.org/en)
### Installation
Below is an example of how to start interacting with the smart contract locally.
1. Clone the repo
```sh
git clone https://github.com/muffin819/staking-reward-solidity.git
```
2. Install NPM packages (remember to move to the directory `staking-rewards` first)
```sh
npm install
```
3. Code installed successfully, you can start testing it.## Usage
You can interact with the smart contract on the local network now.
- `npm run compile` to compile the solidity code
- `npm run deploy` to deploy the contract on the hardhat network
- `npm run test` to run the unit testing of the contract## License
This project is under the MIT License. See `LICENSE` for more information.
## Contact
https://t.me/dogewhiz
## Acknowledgments
We used some web services, open-source projects, and packages that helped us in our development process, which will be listed below.
We would like to apologize if we used a free package or service and forgot to mention it.
* [Best README Template](https://github.com/othneildrew/Best-README-Template)
* [solhint](https://github.com/protofire/solhint)[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=for-the-badge
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=for-the-badge
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=for-the-badge
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=for-the-badge
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/othneildrew
[product-screenshot]: images/screenshot.png[Solidity]: https://img.shields.io/badge/solidity-363636?style=for-the-badge&logo=solidity&logoColor=white
[Solidity-url]: https://soliditylang.org/
[Hardhat]: https://img.shields.io/badge/hardhat-FFF100?style=for-the-badge&logoColor=black
[Hardhat-url]: https://hardhat.org/
[Chainlink]: https://img.shields.io/badge/chainlink-375BD2?style=for-the-badge&logo=chainlink&logoColor=white
[Chainlink-url]: https://chain.link/
[Openzeppelin]: https://img.shields.io/badge/open_zeppelin-412991?style=for-the-badge&logo=openzeppelin&logoColor=white
[Openzeppelin-url]: https://www.openzeppelin.com/contracts