Skip to content

Commit

Permalink
Merge branch 'release/0.3.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zikriya committed Jun 6, 2023
2 parents 215ceac + 3b41fb6 commit 83052d5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
8 changes: 7 additions & 1 deletion erc20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ To check for successful installation, one needs to run this command:
rustup --version.
```

Secondly, you need to install CMake:
Secondly, you'll need to install `wabt` tooling:

```bash
sudo apt install wabt
```

Thirdly, you need to install CMake:

```bash
sudo apt-get -y install cmake
Expand Down
28 changes: 21 additions & 7 deletions staking_contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ To check for successful installation, one needs to run this command:
rustup --version.
```

Secondly, you need to install CMake:
Secondly, you'll need to install `wabt` tooling:

```bash
sudo apt install wabt
```

Thirdly, you need to install CMake:

```bash
sudo apt-get -y install cmake
Expand Down Expand Up @@ -122,7 +128,15 @@ casper-client put-deploy \
--node-address http://44.208.234.65:7777 \
--secret-key ./staking_contract/keys/secret_key.pem \
--session-path ./staking_contract/target/wasm32-unknown-unknown/release/staking_contract.wasm \
--payment-amount 220000000000
--payment-amount 200000000000 \
--session-arg "name:string='FerrumX'" \
--session-arg "address:string='782fe4b0bb944e6b1fd2c5a1456a78f0e2193d47dee9b1af5711d6b6e6aaca60'" \
--session-arg "staking_starts:u64='<milliseconds timestamp>'" \
--session-arg "staking_ends:u64='<milliseconds timestamp>'" \
--session-arg "withdraw_starts:u64='<milliseconds timestamp>'" \
--session-arg "withdraw_ends:u64='<milliseconds timestamp>'" \
--session-arg "staking_total:U256='<amount of tokens you want to be the staking limit>'" \
--session-arg "erc20_contract_package_hash:Key='hash-<contract-package-hash for the CEP18 token you want to be staked by this contract>'"
```

##### Example Stake
Expand All @@ -131,7 +145,7 @@ casper-client put-deploy \
--chain-name casper-test \
--node-address http://44.208.234.65:7777 \
--secret-key ./staking_contract/keys/secret_key.pem \
--session-hash hash-6b6298c3f8c954e4b9a5fa2404768d1c08fd5bfc2927f386aaf0826178d3be5b \
--session-hash hash-<contract-package-hash-of-deployed-coontract> \
--session-entry-point stake \
--payment-amount 5000000000 \
--session-arg "amount:u256='5'"
Expand All @@ -143,7 +157,7 @@ casper-client put-deploy \
--chain-name casper-test \
--node-address http://44.208.234.65:7777 \
--secret-key ./staking_contract/keys/secret_key.pem \
--session-hash hash-ed9d7674bbfe432208780efe4afcae163a588c80eb499596c5f4085f50756cef \
--session-hash hash-<contract-package-hash-of-deployed-coontract> \
--session-entry-point get_current_reward \
--payment-amount 50000000000
```
Expand All @@ -154,7 +168,7 @@ casper-client put-deploy \
--chain-name casper-test \
--node-address http://44.208.234.65:7777 \
--secret-key ./staking_contract/keys/secret_key.pem \
--session-hash hash-5eba0235bbd34613c19163a65ee16ea6c4019fbf5f5e7c8e07fbebd52d92eef4 \
--session-hash hash-<contract-package-hash-of-deployed-coontract> \
--session-entry-point staker_reward \
--payment-amount 50000000000 \
--session-arg "staker_address:key='hash-8c07f894322d86705f9804d682a9ed6c9cd4be7a8fc6889d20b446e1d852fa8c'"
Expand All @@ -166,7 +180,7 @@ casper-client put-deploy \
--chain-name casper-test \
--node-address http://44.208.234.65:7777 \
--secret-key ./staking_contract/keys/secret_key.pem \
--session-hash hash-5eba0235bbd34613c19163a65ee16ea6c4019fbf5f5e7c8e07fbebd52d92eef4 \
--session-hash hash-<contract-package-hash-of-deployed-coontract> \
--session-entry-point add_reward \
--payment-amount 50000000000 \
--session-arg "reward_amount:u256='1'" \
Expand All @@ -179,7 +193,7 @@ casper-client put-deploy \
--chain-name casper-test \
--node-address http://44.208.234.65:7777 \
--secret-key ./staking_contract/keys/secret_key.pem \
--session-hash hash-5eba0235bbd34613c19163a65ee16ea6c4019fbf5f5e7c8e07fbebd52d92eef4 \
--session-hash hash-0f401c728a28f5df5404640e163e42edf420abd93e6b02a45e4f52524b652a71 \
--session-entry-point amount_staked \
--payment-amount 50000000000 \
--session-arg "amount:u256='5'" \
Expand Down

0 comments on commit 83052d5

Please sign in to comment.