The Peace Antz Academy Course Contract is designed to manage educational courses on the Ethereum blockchain. The contract establishes roles such as the administrator (Peace Antz Academy Council Multisig), teachers, students, and sponsors, and offers functionalities like course and payment statuses, teacher-set payment amounts, student stake management, and sponsorship tracking. The contract also allows students to enroll, withdraw, or drop out of courses, while sponsors can provide or withdraw support. Utilizing OpenZeppelin's AccessControl for role-based permissions and Initializable for contract initialization, this contract offers a comprehensive, secure, and user-friendly system for managing educational courses in a decentralized context.
The Course Contract is a decentralized application (dApp) written in Solidity. It is designed to facilitate the setup and operation of an online course system, where teachers, students, and sponsors interact within a blockchain environment. The contract is compatible with any Ethereum Virtual Machine (EVM) compatible chain.
setAmount()
.updateCourseStatus()
. The course will be locked in, and no more enrollments or sponsorship payments can be made.passStudent()
. The student's stake will be returned to them.bootStudent()
. The student's stake will be sent to the Peace Antz Council multisig address.claimPayment()
.enroll()
. You must stake the required amount to be enrolled.withdraw()
.dropOut()
. Your stake will be sent to the Peace Antz Council multisig address.sponsor()
.unsponsor()
.The contract includes multiple events and mappings to track the status of each address (teacher, student, sponsor) and their respective deposits. Roles are tracked using keccak256
hashed values of the role names.
The Peace Antz Council multisig address is set to 0xdD870fA1b7C4700F2BD7f44238821C26f7392148
. This address receives funds from students who drop out of a course.
The contract uses OpenZeppelin's Access Control contract for access control functionalities and the Initializable contract for initializing the contract in an upgradeable context.
This contract has not been audited. Use at your own risk.
If you have any questions, issues, or suggestions, feel free to reach out.
Fixed sponsorship issue. All bugz fixed! For now..
Feb 02, 2024
MIT, Apache-2.0