Test Summary
Test Overview
Full Test Suite Results
MockENS
Subdomain creation
✔ should create a subdomain under .agora
✔ should fail to create the same subdomain with different address from unauthorized account
✔ should fail to register an already owned ENS from unauthorized account
✔ should allow the owner to change the owner of their ENS
SpaceRegistry
createSpace
✔ should create a new space
✔ should revert if space already exists
✔ should revert if name is not a valid ENS name
✔ should revert if display name is too long
✔ should revert if not ENS owner
transferSpaceOwnership
✔ should transfer ownership
✔ should revert if space does not exist
✔ should revert if not owner
✔ should revert if new owner is zero address
deactivateSpace
✔ should deactivate space
✔ should revert if space does not exist
✔ should revert if not owner
isSpaceOwner
✔ should return true for owner of active space
✔ should return false for non-owner
✔ should return false for inactive space
✔ should return false for non-existent space
spaceIsActive
✔ should return true for active space
✔ should return false for inactive space
✔ should return false for non-existent space
getOwnerSpaces
✔ should return spaces owned by address
✔ should return empty array for address with no spaces
getSpace
✔ should return space details
updateSpaceDisplayName
✔ should update display name
✔ should revert if not owner
✔ should revert if display name too long
namehash
✔ should compute correct namehash for .agora domain (79ms)
joinSpace
✔ should allow joining public space
✔ should allow joining whitelist space if whitelisted
✔ should revert joining whitelist space if not whitelisted
✔ should allow joining token holder space if holding sufficient tokens
✔ should revert joining token holder space if holding insufficient tokens
✔ should allow joining NFT holder space if holding sufficient NFTs
✔ should revert joining NFT holder space if holding insufficient NFTs
✔ should revert if already member
✔ should revert if space does not exist
✔ should revert if space is inactive
leaveSpace
✔ should allow leaving space
✔ should revert if not member
✔ should revert if space does not exist
getSpaceMembers
✔ should return space members
✔ should revert if space does not exist
addToWhitelist and removeFromWhitelist
✔ should add to whitelist
✔ should remove from whitelist
✔ should revert if not owner
addSpaceAdmin and removeSpaceAdmin
✔ should add admin
✔ should remove admin
✔ should revert if not owner
✔ should revert if adding zero address as admin
isSpaceAdmin
✔ should return true for admin of active space
✔ should return false for non-admin
✔ should return false for inactive space
PrivateProposalFactory
Deployment
✔ Should set the correct owner
✔ Should start with zero total proposals
Proposal Creation
✔ Should create proposal successfully
✔ Should create multiple proposals for same user
✔ Should create proposals for different users
✔ Should prevent creation with empty title
✔ Should handle reentrancy protection
Proposal Management
✔ Should return correct proposal count by space
✔ Should return proposals by space
✔ Should validate proposal correctly
✔ Should return all proposals
Proposal Contract Functionality
✔ Should initialize proposal correctly
✔ Should be functional after deployment
Edge Cases and Error Handling
✔ Should handle zero address space
✔ Should handle maximum values
✔ Should maintain correct state after many operations
Chainlink Automation
✔ Should detect upkeep needed for ended proposals
✔ Should perform upkeep on ended proposals
✔ Should not need upkeep when no proposals are ready
✔ Should handle multiple proposals needing upkeep
PrivateProposal Voting and Resolution
Non-Weighted Single Choice Voting
✔ Should allow users to vote with encrypted choices
✔ Should prevent double voting
✔ Should resolve proposal correctly after voting (54ms)
Weighted Single Choice Voting
✔ Should allow weighted voting based on token balance
✔ Should resolve weighted voting correctly
Weighted Fractional Voting
✔ Should allow fractional voting with percentage splits
✔ Should resolve fractional voting correctly
Voting with Abstain Option
✔ Should include abstain as the last choice
✔ Should exclude abstain votes from winner calculation
Passing Threshold Logic
✔ Should handle draw correctly
Prediction Market
✔ Should allow users to make predictions with token stakes
✔ Should allow users to update predictions (auto-cancel previous)
✔ Should allow users to cancel predictions with 1% fee
✔ Should prevent predictions after reveal
✔ Should allow winners to claim proportional winnings (46ms)
✔ Should prevent double claiming
✔ Should return correct prediction market info
✔ Should return correct user prediction info
93 passing (2s)Test Categories and Results
✅ MockENS Tests (4 passing)
✅ SpaceRegistry Tests (47 passing)
✅ PrivateProposalFactory Tests (20 passing)
✅ PrivateProposal Voting and Resolution Tests (22 passing)
✅ Weighted Single Choice Voting
✅ Weighted Fractional Voting
✅ Voting with Abstain Option
✅ Passing Threshold Logic
✅ Prediction Market (8 passing)
Overall Test Status
Limitations and Considerations
FHE Testing Environment
Resolution Process
Security and Edge Cases
Last updated