https://github.com/crypto-com/cro-staking
https://github.com/crypto-com/cro-staking
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/crypto-com/cro-staking
- Owner: crypto-com
- License: other
- Created: 2020-09-02T08:43:01.000Z (almost 6 years ago)
- Default Branch: develop
- Last Pushed: 2023-01-24T03:47:16.000Z (over 3 years ago)
- Last Synced: 2023-03-03T19:48:41.505Z (over 3 years ago)
- Language: JavaScript
- Size: 653 KB
- Stars: 9
- Watchers: 4
- Forks: 18
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# DeFi Swap | ERC 900 Contracts
[](https://github.com/crypto-com/cro-staking/actions/runs/237971754)
*Inspired by [Codex Protocol | ERC 900 Contracts](https://github.com/codex-protocol/contract.erc-900)*
## Background
For background on ERC-900 itself, view the issue in the EIP repo here: https://github.com/ethereum/EIPs/issues/900
## Contracts
- ERC900.sol - ERC-900 interface
- ERC900BasicStakeContract.sol and BasicStakingContract.sol- A basic implementation of the ERC-900 interface that allows staking of specified ERC20 token.
## Code coverage
```
-------------------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
-------------------------------|----------|----------|----------|----------|----------------|
ERC900/ | 100 | 83.33 | 100 | 100 | |
BasicStakingContract.sol | 100 | 100 | 100 | 100 | |
ERC900.sol | 100 | 100 | 100 | 100 | |
ERC900BasicStakeContract.sol | 100 | 83.33 | 100 | 100 | |
library/ | 100 | 100 | 100 | 100 | |
Debuggable.sol | 100 | 100 | 100 | 100 | |
-------------------------------|----------|----------|----------|----------|----------------|
All files | 100 | 83.33 | 100 | 100 | |
-------------------------------|----------|----------|----------|----------|----------------|
```
## Deploy contracts
1. uncomment relevant network sessions in truffle-config.js
2. Populate .env with INFURA_API_KEY and MNEMONIC
3.
- 3.1. if you are deploying from the start, run ```yarn deploy-on-ropsten``` ;
- 3.2. or if you are only deploying delta, add files under our/cro-staking/migrations/* with next sequence number,
and run ```./node_modules/.bin/truffle migrate --network $network_name```