đĒBasic Smart Contract
This section contains an assignment to create a basic smart contract, handling token minting, transfers, and burns. It also involves integrating transaction fees and earning an NFT badge.
Step 1: Define Smart Contract Functionality
Objective: Create a smart contract that mints a CIS-2 token, transfers it, and burns it when invoked by the Concordium client. Ensure that each operation (invokes) requires 20 CCDs as transaction fees and prevents minting the same token ID twice.
Step 2: Add Payable Attribute
Objective: Add the payable attribute to the #[receive] macro to allow the smart contract to accept CCD.
Step 3: Earn NFT Certificate
Objective: You will earn the beginner-level NFT Certificate upon completing the smart contract.
Implementation Guidelines
Define Smart Contract Functions: Write functions for minting, transferring, and burning CIS-2 tokens. Include logic to check for duplicate token IDs.
Transaction Fee Handling: Implement logic to ensure that each operation requires 20 CCDs as transaction fees.
Add Payable Attribute: Add the payable attribute to the #[receive] macro to enable the smart contract to accept CCD.
Testing: Test the smart contract thoroughly to ensure it functions as expected, including minting, transferring, burning tokens, and handling transaction fees.
Submission: Submit your completed smart contract implementation for assessment.
Last updated