Skip to content

feat: add append-only holder registry per creator key (issue #831) - #845

Open
meem08 wants to merge 8 commits into
accesslayerorg:mainfrom
meem08:feat/holder-registry-831
Open

feat: add append-only holder registry per creator key (issue #831)#845
meem08 wants to merge 8 commits into
accesslayerorg:mainfrom
meem08:feat/holder-registry-831

Conversation

@meem08

@meem08 meem08 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor
  • Reworked DataKey to store Vec per creator (holder_registry)
  • Added get_holder_registry view returning full list
  • Derived has_ever_held and get_historical_holder_count from registry
  • TTL bumped on every read and write (extend_key_ttl_to_full_window)
  • Circuit breaker fix: read CIRCUIT_BREAKER_THRESHOLD from storage, default 30%
  • Pre-existing formatting fixes to prelaunch_auction and staking_reward_claim tests

Summary

closes #831

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

Checklist

  • Linked issue or backlog item
  • Added or updated creator-keys unit/integration tests for every changed contract behavior, including failure paths for new or reachable ContractError variants
  • Ran cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace, or explained exactly why a command was not run
  • Reviewed persistent storage changes against docs/storage-key-invariants.md; any storage layout change includes a migration/backward-compatibility note
  • Confirmed event names, topic order, payload field order, and field meanings remain compatible with docs/contract-event-conventions.md, or documented the breaking change and versioning plan
  • Updated docs for any changed public contract interface, read-only method, event schema, storage behavior, fee logic, or deployment workflow
  • Scope stays limited to one contract concern and does not include unrelated formatting, lockfile, generated artifact, or dependency changes

…yerorg#831)

- Reworked DataKey to store Vec<Address> per creator (holder_registry)
- Added get_holder_registry view returning full list
- Derived has_ever_held and get_historical_holder_count from registry
- TTL bumped on every read and write (extend_key_ttl_to_full_window)
- Circuit breaker fix: read CIRCUIT_BREAKER_THRESHOLD from storage, default 30%
- Pre-existing formatting fixes to prelaunch_auction and staking_reward_claim tests
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@meem08 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

meem08 added 4 commits August 31, 2026 15:26
…yerorg#831)

- Reworked DataKey to store Vec<Address> per creator (holder_registry)
- Added get_holder_registry view returning full list
- Derived has_ever_held and get_historical_holder_count from registry
- TTL bumped on every read and write (extend_key_ttl_to_full_window)
- Circuit breaker fix: read CIRCUIT_BREAKER_THRESHOLD from storage, default 30%
- Pre-existing formatting fixes to prelaunch_auction, staking_reward_claim, events.rs, and test_staking_lifecycle.rs for cargo fmt compliance
@Chucks1093

Copy link
Copy Markdown
Member

❌ CI Failed — verify (Contracts CI)

The verify check is failing on this PR.

Likely causes:

  • Compile error from unresolved identifier or missing import after merge
  • cargo fmt not run — formatting diff causes CI to fail
  • Clippy lint warnings treated as errors (deny(warnings))

Steps to fix:

  1. Run cargo build locally and fix any errors
  2. Run cargo fmt --all and commit the result
  3. Run cargo clippy -- -D warnings to catch any lint issues
  4. Push — CI will re-run automatically

meem08 and others added 3 commits September 4, 2026 09:10
Merging upstream/main into feat/holder-registry-831 left duplicate
FeeCollectedEvent/LockupBlockedEvent structs and FEE_COLLECTED_EVENT_NAME/
LOCKUP_BLOCKED_EVENT_NAME constants in events.rs, which failed to compile
(E0428, "defined multiple times") and broke CI. Keep the canonical copies.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
…merge

The merge with upstream main left duplicate definitions in lib.rs that
broke compilation (E0428): last_buy_timestamp x3 and holder_cap_bps x2
inside constants::storage, plus two conflicting top-level
credit_staking_rewards_pool fns. Keep the canonical StakingRewardsState
implementation and drop the stale bare-i128 variant and its reader.

Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
…y-831

Resolve conflicts with upstream main:
- events.rs: keep upstream auction events, drop duplicate fee event doc
- lib.rs: keep holder_registry alongside staking/auction DataKey variants;
  single circuit-breaker threshold read from storage
- test_issues_778_779_781_782.rs: use unwrapped client view results
- delete staking_reward_claim.rs (incompatible 2-arg API; superseded by
  test_staking_lifecycle.rs)
- fix clippy lint errors in holder_registry.rs tests

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a holder registry map that tracks all wallet addresses that have ever held a creator key

2 participants