- Backend servers listening to on-chain events
- Relayers or cron jobs to call issuing contracts
- Notification services to inform students
Overview
The system consists of three core layers:- Student registration: On-chain
- Certificate issuance: On-chain automation
- Student notification: Off-chain via Telegram
Step 1: Student registration smart contract
The StudentRegistry contract is responsible for registering students on-chain with:- A unique student ID
- A wallet address
- Each wallet can register only once
- Each student ID is globally unique
- Registration emits an event consumed by Kwala
StudentRegistry.sol
Event Signature:
StudentRegistered(address indexed student, uint256 indexed studentId)This event triggers the automated certificate issuance workflow.Step 2: Certificate issuance smart Contract
The CertificateIssuer contract issues certificates only once per student and records:- Certificate ID
- Student wallet
- Student ID
CertificateIssuer.sol
Step 3: Workflow 1 - Auto-issuing certificates via Kwala
Automatically issue a certificate immediately after student registration. Trigger- Event:
StudentRegistered(address,uint256) - Source Contract: StudentRegistry (SC1)
0x2b9AB67a9EBfe5E5481d007071E38950EA29da4a - Chain: Polygon Amoy 80002
- CALL
issueCertificate(student, studentId)on CertificateIssuer - POST a Telegram message indicating certificate issuance has started
IssueCertificate.yaml
re.event(index) and passes them directly to smart contract calls without backend parsing required.
re.event(0)→ student addressre.event(1)→ student ID
Step 4: Workflow 2 - Certificate delivery notification
Notify the student once the certificate is successfully issued on-chain. Trigger- Event:
CertificateIssued(address,uint256,uint256) - Source Contract: CertificateIssuer (SC2)
0x192c91565ed652675FCd88A23e096261b5e290E1 - Chain: Polygon Amoy 80002
- Student ID
- Certificate ID
- Wallet address
CertificateNotification.yaml
Dynamic Parameters:
re.event(0)→ student wallet addressre.event(1)→ student IDre.event(2)→ certificate ID
Complete flow summary
The certificate issuance workflow follows these four steps:- Step 1: Registration - Student calls register() on StudentRegistry contract
- Step 2: Event emitted - StudentRegistered event triggers Workflow 1
- Step 3: Certificate issued - Kwala calls issueCertificate() on CertificateIssuer
- Step 4: Notification - CertificateIssued event triggers Workflow 2 and Telegram notification sent
- Academic credentials - Degrees, diplomas, and course completions
- Professional badges - Skill certifications and training credentials
- Government IDs - Verifiable identity documents and licenses
- Enterprise credentials - Employee certifications and compliance records
Conclusion
This use case demonstrates how Kwala Workflows can be used to build a production-ready, automated certificate issuance system using solidity smart contracts, on-chain events and YAML workflow definitions. By combining StudentRegistry, CertificateIssuer, and Kwala, institutions can issue verifiable certificates at scale securely, transparently, and without infrastructure overhead. Kwala handles the automation. Blockchain guarantees trust.Next steps
Monitor Your Workflow
Track execution history, debug issues, and optimize your automation
Best Practices
Learn optimization strategies and production patterns
