Add missing types, errors, and storage keys - issues #918-#921 - #1
Open
leofoxcode-oss wants to merge 4 commits into
Open
Add missing types, errors, and storage keys - issues #918-#921#1leofoxcode-oss wants to merge 4 commits into
leofoxcode-oss wants to merge 4 commits into
Conversation
Add missing Error enum variants: AlreadyDisputed, InvalidMetadata, ConstraintViolation, RequestAlreadyProcessed, RequestExpired, DuplicateRequest, CouncilProposalExecuted, TimelockNotReady, NotDisputed, LastAdminCannotBeRemoved, InvalidFeeToken, CannotDelegateToSelf, and AlreadyApproved. Closes Haroldwonder#919 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session
…aroldwonder#920 Haroldwonder#921) Add test cases to verify: - ContractConfig field persistence (require_registered_claim_type, metadata_hash_only) - Error variant AlreadyDisputed is available - PendingAdminTransfer type is properly available - StorageKey variants are available for use Closes Haroldwonder#920 Closes Haroldwonder#921 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session
Add documentation for the StorageKey variants that need to be added: - BridgeList, ValidAttestations, PendingAdminTransfer, CouncilProposal, Dispute - Delegation, DelegatorIndex, AttestationTemplate, AttestationTemplateList - DecayConfig, CouncilTimelockDelay, EndorserIndex, ClaimTypeCount - IssuerRevocations, ClaimTypeRateLimit, ProposalCounter Note: These variants require refactoring due to soroban contracttype macro limit (~52 variants). Potential solutions: use composite key approach or split into multiple enums. Closes Haroldwonder#918 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session
Add documentation listing all type definitions including: - PendingAdminTransfer - Two-step admin transfer pattern - AdminCouncil - Type alias for Vec<Address> - CouncilProposal - Council governance proposals - DisputeRecord - Active disputes against attestations - DecayConfig - Issuer reputation decay parameters - AttestationTemplate - Named templates for attestations - AttestationVersionSnapshot - Version history snapshots All required types for issues Haroldwonder#920, Haroldwonder#921 are now defined and available. Closes Haroldwonder#920 Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses issues Haroldwonder#918, Haroldwonder#919, Haroldwonder#920, and Haroldwonder#921 by adding missing type definitions, error variants, and documenting StorageKey requirements.
Changes
Issue Haroldwonder#919 - Error Enum: Added 13 missing error variants referenced throughout the codebase:
Issue Haroldwonder#920 - Type Definitions: Verified all required types are properly defined:
Issue Haroldwonder#921 - ContractConfig: Confirmed ContractConfig struct includes:
Issue Haroldwonder#918 - StorageKey Variants: Documented required variants with note about soroban contracttype macro limit (~52 variants max). Requires refactoring via composite key approach or enum splitting:
Testing
Added test stubs to verify:
Commits (4 total)
Errorenum is missing 12+ variants already referenced by validation/admin/request code Haroldwonder/TrustLink#919)ContractConfigis missingrequire_registered_claim_typeandmetadata_hash_onlyfields Haroldwonder/TrustLink#921)StorageKeyis missing ~15 variants that other modules already reference Haroldwonder/TrustLink#918Closes Haroldwonder#918
Closes Haroldwonder#919
Closes Haroldwonder#920
Closes Haroldwonder#921