[go: up one dir, main page]

Proto/CLST: withdraw tez

This MR adds a withdraw entrypoint to the CLST contract.

Manually testing the MR

dune exec src/proto_alpha/lib_protocol/test/integration/main.exe -- --file test_clst.ml -m "Test CLST withdraw"

or in sandbox:

  • activate alpha
./src/bin_node/octez-sandboxed-node.sh 1 --connections 0
eval $(./src/bin_client/octez-init-sandboxed-client.sh 1)
octez-activate-alpha
  • get the clst hash contract: octez-client rpc get /chains/main/blocks/head/context/raw/json/contracts/native_contracts/clst (KT1WCsbJx996ebZfutAitHYsZ8FUZFsTdaD7)
  • deposit some tez to the clst contract
octez-client --wait none transfer 3000000 from bootstrap2 to KT1WCsbJx996ebZfutAitHYsZ8FUZFsTdaD7 --burn-cap 1 --entrypoint "deposit"
octez-client bake for --minimal-timestamp
  • check rpc for the spendable balance: octez-client rpc get /chains/main/blocks/head/context/contracts/tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN/balance
  • check rpc for the clst balance: octez-client rpc get /chains/main/blocks/head/context/contracts/tz1gjaF81ZRRvdzjobyfVNsAeSC6PScjfQwN/clst_balance
  • check receipts in the block metadata: octez-client rpc get /chains/main/blocks/head/operations
  • withdraw some tez from the clst contract
octez-client --wait none transfer 0 from bootstrap2 to KT1WCsbJx996ebZfutAitHYsZ8FUZFsTdaD7 --burn-cap 1 --entrypoint "withdraw" --arg "2000000"
octez-client bake for --minimal-timestamp
  • check rpc for the spendable and clst balances, and receipts

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Marina Polubelova

Merge request reports

Loading