concordium-rust-smart-contracts
concordium-rust-smart-contracts copied to clipboard
remuneration smart contract
Description Adding a remuneration smart contract example. This smart contract will be used for a mini-tutorial on CIS-2/wCCD tokens. This mini-tutorial will be applied to the final version wCCD token.
This tutorial is for people:
- who want to learn how to interact directly with third-party smart contracts already deployed on-chain instead of via a front-end (meaning for people who do not intend to write/deploy their own contract but who want to invoke the smart contract in a way that the given front-end does not support)
- who struggled to get the piggy bank tutorial to compile, deploy, or initialize. These people can start with this tutorial which already provides the deployed contracts on testnet.
- who want to learn how an account or smart contract can interact with CIS-2 or wCCD token contracts (e.g. how are operators used and when does the tutorial reader have to add an operator before )
- who want to learn how to check the CIS-2/wCCD balances of their accounts
- who want to go through the flow of adding an operator to their account address and transferring CIS-2/wCCD tokens via a smart contract function from their account to another account
The mini-tutorial flow will be as follow:
- Smart contracts are already deployed on testnet by us
- Step: Tutorial reader should make their own account the “hot_wallet_address” of the company.
- Step: Tutorial reader should approve (add as operator) the remuneration smart contract, so that the remuneration smart contract can access funds on the “hot_wallet_address”.
- Step: Tutorial reader should make their own account (a second account) an “employee” of the company.
- Step: Tutorial reader should call the “claim” function as an “employee” to get their salary paid in wCCD token from the “hot_wallet_address” of the company.