2.0 KiB
2.0 KiB
Test Event Fixes - Complete
Date: 2025-12-24
Status: ✅ All test event emission errors fixed
✅ Fixed Test Files
Issue
Tests were trying to emit events from interfaces or abstract contracts, which is not allowed in Solidity. Events can only be emitted from concrete contract instances.
Solution
Added helper event definitions in each test contract that match the interface/abstract contract event signatures, then updated emit statements to use the helper events.
📋 Files Fixed
1. CompliantUSDTTest.t.sol
- Issue:
emit LegallyCompliantBase.ValueTransferDeclared(...) - Fix: Added helper event
ValueTransferDeclaredin test contract - Status: ✅ Fixed
2. AccountWalletRegistryTest.t.sol
- Issue:
emit IAccountWalletRegistry.AccountWalletLinked(...)andAccountWalletUnlinked(...) - Fix: Added helper events
AccountWalletLinkedandAccountWalletUnlinked - Status: ✅ Fixed
3. RailEscrowVaultTest.t.sol
- Issue:
emit IRailEscrowVault.Locked(...)andReleased(...) - Fix: Added helper events
LockedandReleased - Status: ✅ Fixed
4. SettlementOrchestratorTest.t.sol
- Issue:
emit ISettlementOrchestrator.Submitted(...)andRejected(...) - Fix: Added helper events
SubmittedandRejected - Status: ✅ Fixed
5. RailTriggerRegistryTest.t.sol
- Issue:
emit IRailTriggerRegistry.TriggerCreated(...)andTriggerStateUpdated(...) - Fix: Added helper events
TriggerCreatedandTriggerStateUpdated - Status: ✅ Fixed
6. ISO20022RouterTest.t.sol
- Issue:
emit IISO20022Router.OutboundSubmitted(...)andInboundSubmitted(...) - Fix: Added helper events
OutboundSubmittedandInboundSubmitted - Status: ✅ Fixed
✅ Verification
All test files should now compile successfully:
cd /home/intlc/projects/proxmox/smom-dbis-138
forge build --via-ir
Expected: ✅ Compilation successful
Last Updated: 2025-12-24