Skip to content

Commit

Permalink
add wrap, unwrap, claimrewards, set percentage fee commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Gašper Košmrlj committed Jun 9, 2022
1 parent 95d97c2 commit a527a71
Show file tree
Hide file tree
Showing 16 changed files with 3,202 additions and 6 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,24 @@ which runs the script `scripts/docker-build.sh`

Deployment address is defined by setting SERVER variable in the script.

# Running various commands

One-time calls for wrapping, unwrapping, claiming rewards and setting data provider fee percents.

Must set `RPC_URL` and either `PROJECT_SECRET` or `PRIVATE_KEY` as env variables, and run `yarn tsc` to compile the typescript.

## Wrap

To wrap native currency (SGB, FLR, CFLR) to wrapped instance (WSGB, WFLR, WCFLR) run from root folder: `./scripts/run-command.sh Wrap <amount>` where `<amount>` is in native currency (e.g. 2 for 2 SGB). Also, `<amount>` may be ommited - in this case everything but 100 units are wrapped!

## Unwrap

To unwrap wrapped currency (WSGB, WFLR, WCFLR) to native instance (SGB, FLR, CFLR) run from root folder: `./scripts/run-command.sh Unwrap <amount>` where `<amount>` is in wrapped currency (e.g. 2 for 2 WSGB). Also, `<amount>` may be ommited - in this case everything is unwrapped!

## ClaimRewards

To claim rewards for certain reward epochs run from root: `./scripts/run-command.sh ClaimRewards <epochs>` where `<epochs>` are rewards epochs separated by comma (e.g. 32,33,34) - this parameter is mandatory.

## SetFee

To set fee percents run from root: `./scripts/run-command.sh SetFee <fee>` where `<fee>` must be a number between 0 and 100 and represents fee percentage (e.g. 100 for 100% fee) - this parameter is mandatory.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/c702750dcd09f741e9a5f7b74089a192.json"
}
Loading

0 comments on commit a527a71

Please sign in to comment.