tutus-chain/pkg/core/native/native_test
Tutus Development 5678ae0e46 Complete Collocatio native contract for PIO/EIO/CIO investments
Implement comprehensive investment infrastructure with three tiers:
- PIO (Public Investment Opportunity): Universal citizen access
- EIO (Employee Investment Opportunity): Workplace democracy
- CIO (Contractor Investment Opportunity): Gig economy empowerment

New Features:

Violation System:
- recordViolation: Record violations with evidence and penalties
- resolveViolation: Resolve violations with committee authority
- getViolation: Query violation records
- Auto-ban after MaxViolationsBeforeBan threshold

Employment Verification (EIO eligibility):
- verifyEmployment: Register employee-employer relationships
- revokeEmployment: End employment verification
- getEmploymentStatus: Query employment records
- EIO eligibility requires active employment

Contractor Verification (CIO eligibility):
- verifyContractor: Register contractor-platform relationships
- revokeContractor: End contractor verification
- getContractorStatus: Query contractor records
- CIO eligibility requires active contractor status

Returns Distribution:
- distributeReturns: Proportional returns to all investors
- cancelOpportunity: Refund investors on cancellation

Education Integration:
- completeInvestmentEducation: Mark investor education complete
- Scire certification tracking for eligibility

Query Methods:
- getInvestmentsByOpportunity: List investments per opportunity
- getInvestmentsByInvestor: List investments per investor
- getOpportunitiesByType: Filter by PIO/EIO/CIO
- getOpportunitiesByStatus: Filter by lifecycle status

Lifecycle Automation (PostPersist):
- Auto-close opportunities past investment deadline
- Auto-fail opportunities below minimum participants
- Runs every 100 blocks for performance

State Serialization:
- Add ToStackItem/FromStackItem for EmploymentVerification
- Add ToStackItem/FromStackItem for ContractorVerification
- Add ToStackItem/FromStackItem for InvestmentViolation

Tests:
- 14 test cases for config, counters, queries, error handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 04:18:23 +00:00
..
helpers/policyhelper Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
annos_test.go Add Annos lifespan contract and Eligere voting age integration 2025-12-21 00:55:29 +00:00
collocatio_test.go Complete Collocatio native contract for PIO/EIO/CIO investments 2025-12-21 04:18:23 +00:00
common_test.go Rename interop packages neo→tutus and gas→lub 2025-12-21 03:20:53 +00:00
cryptolib_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
cryptolib_verification_test.go Rename NEO to Annos and GAS to Lub native contracts 2025-12-20 11:34:42 +00:00
designate_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
eligere_test.go Add Eligere native contract tests 2025-12-20 06:44:00 +00:00
gas_test.go Rename NEO to Annos and GAS to Lub native contracts 2025-12-20 11:34:42 +00:00
ledger_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
management_test.go Complete Collocatio native contract for PIO/EIO/CIO investments 2025-12-21 04:18:23 +00:00
neo_test.go Rename interop packages neo→tutus and gas→lub 2025-12-21 03:20:53 +00:00
notary_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
opus_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
oracle_test.go Rename NEO to Annos and GAS to Lub native contracts 2025-12-20 11:34:42 +00:00
policy_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
role_registry_test.go Add RoleRegistry native contract for hierarchical RBAC 2025-12-20 01:35:26 +00:00
salus_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
scire_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
sese_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
std_test.go Update all imports from neo-go to tutus-chain 2025-12-19 14:28:17 +00:00
treasury_test.go Rename NEO to Annos and GAS to Lub native contracts 2025-12-20 11:34:42 +00:00
tribute_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
vita_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00
vts_test.go Complete Annos to Tutus rename across codebase 2025-12-21 00:56:43 +00:00