This repository contains two Solidity smart contracts that work together to manage events, register users, and issue proof of attendance using NFTs. The contracts are:
- Aven.sol: Manages user registration, event creation, attendance tracking, and proof of attendance minting.
- AvenPOA.sol: An ERC-1155 token contract used to mint Proof of Attendance (POA) NFTs for event attendees.
- AvenPOA: 0x894801D9fB0Dafb92a36951592Eb4720b535D816
- Aven: 0x03dba7Ab94eebD491e446F386BC5f3845faEB595
The Aven contract allows users to register on the platform, create events, and track attendance. It also integrates with the AvenPOA contract to issue Proof of Attendance (POA) tokens to users who attend and complete events.
- User Registration: Users can register on the platform by calling
registerUser(). - Event Creation: Event creators can create events using
createEvent()with details like title, description, start date, and duration. - Event Sign-up: Users can sign up for events using
eventSignup(). - Event Archive: Events can be archived using
archiveEvent(). - Proof of Attendance (POA): Users can receive POA tokens upon successful event completion by calling
proofOfAttendance().
UserRegistered: Emitted when a user registers.AttendanceProof: Emitted when a POA token is minted.
The AvenPOA contract is an ERC-1155 token that serves as a Proof of Attendance (POA) for events. It allows the minting of NFTs to users who attended events.
- Minting: The contract owner can mint individual or batch NFTs using
mint()andmintBatch(). - URI Management: The contract owner can set the metadata URI for the NFTs.
- Upgradeable: The contract uses the UUPS pattern for upgradeability.
-
Deploy AvenPOA Contract: Deploy the
AvenPOAcontract, initializing the contract with the owner's address. -
Deploy Aven Contract: Deploy the
Avencontract and pass the deployedAvenPOAcontract address as a parameter to the constructor. -
Register Users: Users can register on the platform by calling
registerUser(). -
Create Events: Authorized users can create events with relevant details.
-
Attend Events: Users can sign up for events using
eventSignup(). -
Mint POA: After the event is completed, users who attended can receive a POA by calling
proofOfAttendance().
- OpenZeppelin Contracts:
- ERC-1155
- Ownable
- UUPSUpgradeable
Make sure to install the required OpenZeppelin contracts by running:
npm install @openzeppelin/contracts-upgradeableThis project is licensed under the MIT License.