Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/klaytn/cn-staking-contract-tests
https://github.com/klaytn/cn-staking-contract-tests
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/klaytn/cn-staking-contract-tests
- Owner: klaytn
- License: mit
- Created: 2020-10-08T06:46:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-29T07:04:17.000Z (12 months ago)
- Last Synced: 2024-08-03T18:19:24.801Z (6 months ago)
- Language: Shell
- Homepage:
- Size: 39.1 KB
- Stars: 4
- Watchers: 17
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-klaytn - CN Staking contract tests
- awesome-kaia - CN Staking contract tests
README
# Klaytn CN Staking contract tests
This repo contains test code for [cn staking contract](https://github.com/klaytn/klaytn/tree/dev/contracts/cnstaking).
Using this test code, you can easily test the cn staking contract.## Getting Started
```
$ ./run.sh
```This script will deploy a private Klaytn network on the local machine with a single CN using `docker-compose`.
Then, it performs the following actions to staking contract to test staking/unstaking:1. Fill KLAY to the contract deployer.
1. Deploy the cn staking contract.
1. Initialize the cn staking contract.
1. **stake**
1. Submit a withdrawal. This is the first step of unstake. One of admin accounts should perform this.
1. Confirm the withdrawal. Other admin accounts should perform this.
1. **unstake** is done through `withdrawApprovedStaking()`.Please refer to `fullExec()` in index.js to find above actions.
Note that lockup of one week of this cn staking contract is removed for testing.