Astar icon indicating copy to clipboard operation
Astar copied to clipboard

RPC tests for dapp staking

Open niklabh opened this issue 2 years ago • 1 comments

Pull Request Summary

Added tests for:

  1. Register contract on H160 address 0x1 using Alice account.
  2. Bond & stake minimum staking amount on registered contract using Bob account.
  3. Bond & stake an additional 500 tokens on the same contract using Bob account.
  4. Unbond 250 tokens.
  5. Ensure that at least a few blocks occur after step 3 (2 blocks should be enough).
  6. Force a new era using a sudo call.
  7. Claim dapp rewards for registered contract
  8. Claim staker rewards for registered contract
  9. Unbond 250 tokens.
  10. Advance for UnbondingPeriod amount of eras until the first unbonding chunk can be withdrawn
  11. Withdraw unbonded funds
  12. Advance ONE era using sudo call
  13. Withdraw the remaining unbonded chunk

Check list

  • [x] added or updated unit tests
  • [ ] updated Astar official documentation
  • [ ] added OnRuntimeUpgrade hook for precompile revert code registration
  • [ ] updated spec version
  • [ ] updated semver

niklabh avatar Aug 09 '22 09:08 niklabh

@niklabh what is the status of this PR?

hoonsubin avatar Sep 26 '22 06:09 hoonsubin

Not able to merge this as commits were not signed with a gpg key. Merging is blocked for this PR. Creating a new one. Screenshot from 2022-10-21 14-21-24

niklabh avatar Oct 21 '22 12:10 niklabh