Skip to content

Commit e1a5e4a

Browse files
author
Vicky08100
committed
feat(certificate): implement compliance auditing, certificate templates, and troubleshooting guide
Resolves #379, #472, #483. - Implemented immutable audit logging with institutional governance roles. - Added certificate template system with variable substitution and pagination. - Integrated automated compliance violation alerts and monitoring. - Added comprehensive developer troubleshooting guide for Soroban operations. - Optimized storage rent management (TTL) and implemented DoS protection (rate limiting).
1 parent c647a92 commit e1a5e4a

7 files changed

Lines changed: 683 additions & 27 deletions

File tree

contracts/certificate/src/events.rs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ pub fn emit_certificate_shared(
165165
);
166166
}
167167

168-
/// Emit when a compliance check is performed.
169168
pub fn emit_compliance_checked(
170169
env: &Env,
171170
verifier: &Address,
@@ -183,6 +182,25 @@ pub fn emit_compliance_checked(
183182
);
184183
}
185184

185+
/// Emit when a compliance violation is detected.
186+
pub fn emit_compliance_violation(
187+
env: &Env,
188+
certificate_id: &BytesN<32>,
189+
standard: &str,
190+
details: &str,
191+
) {
192+
emit_certification_event!(
193+
env,
194+
symbol_short!("cert"),
195+
env.current_contract_address(),
196+
CertificationEventData::ComplianceViolation(ComplianceViolationEvent {
197+
certificate_id: certificate_id.clone(),
198+
standard: String::from_str(env, standard),
199+
violation_details: String::from_str(env, details),
200+
})
201+
);
202+
}
203+
186204
/// Emit when a certificate template is created.
187205
pub fn emit_template_created(env: &Env, template_id: &String, created_by: &Address) {
188206
emit_certification_event!(

0 commit comments

Comments
 (0)