Project involves writing, testing, and deploying an ERC-721 Token Standard smart contract on the Polygon Mumbai Testnet
Project Overview:
- Objective: Gain practical experience with the Ethereum ecosystem, specifically ERC-721 Token Standard smart contracts.
- Purpose: Familiarize with Ethereum and blockchain development for EVM-based Web3 projects, including DAOs and NFTs.
Background:
- Deployment on Polygon Mumbai Testnet (part of EVM Ecosystem), using MATIC as the currency.
- Introduction to token standards, focusing on ERC-721 for interoperable applications.
ERC-721 Token Standard:
- Definition: A non-fungible token standard widely used in Ethereum for unique tokens.
- Specific methods and events defined for ERC-721 contracts.
- Examples of methods include
balanceOf
,ownerOf
, andsafeTransferFrom
. - Examples of events include
Transfer
,Approval
, andApprovalForAll
.
Set-Up Tasks:
- Install MetaMask for connecting to Polygon Mumbai Network.
- Configure Polygon Mumbai Testnet on MetaMask.
- Acquire MATIC using Polygon Mumbai Testnet Faucet.
- Utilize Remix IDE and Solidity for smart contract development.
- Understand and use IPFS for storing files and images.
Project Tasks:
Task 1 - Complete the getDeviceByKey function: Objective: Retrieve a device record by its composite key (device_serial and price). Functionality: Complete the code for the getDeviceByKey function to return the device record based on the composite key.
Task 2 - Complete getter and setter methods for the lastUpdate field: Objective: Implement lastUpdate field for DeviceRecord. Functionality: Create setlastUpdate and getlastUpdate functions to manipulate the lastUpdate field of DeviceRecord.
Task 3 - Complete updateLastUpdate function: Objective: Update the last update date of a device record. Functionality: Complete the updateLastUpdate function to update the last update date of a device record.
Task 4 - Complete queryByCompany function: Objective: Query device records by company. Functionality: Build an index on the company attribute and complete the queryByCompany function to retrieve records based on the company.
Task 5 - Complete querybyDevice_Type function: Objective: Query device records by device_type. Functionality: Build an index on the device_type attribute and complete the querybyDevice_Type function to retrieve records based on device_type.
Task 6 - Complete querybyDevice_Type_Dual function: Objective: Query device records by two device types. Functionality: Build an index on two device types and complete the querybyDevice_Type_Dual function to retrieve records with the specified device types.
Task 7 - Complete the unknownTransaction function: Objective: Handle unknown transactions. Functionality: Implement the unknownTransaction function to throw an error message when a non-existent function is called.
This project offers practical learning in blockchain development, focusing on ERC-721 token contracts and the Polygon Mumbai Testnet.