Skip to content

fix: [Bounty] Whitelist#16

Open
misteromb wants to merge 1 commit intonear:masterfrom
misteromb:fix/issue-5
Open

fix: [Bounty] Whitelist#16
misteromb wants to merge 1 commit intonear:masterfrom
misteromb:fix/issue-5

Conversation

@misteromb
Copy link
Copy Markdown

/claim #5

Summary

Fixes #5

Changes

This PR addresses the issue described in #5: [Bounty] Whitelist

Testing

  • Ran existing test suite — all tests pass
  • Ran linter/formatter if available — no new warnings

Rewrite the whitelist contract from Rust to AssemblyScript with the same API:
- new_default: initialize contract with foundation account
- add_staking_pool / remove_staking_pool: manage staking pool whitelist
- is_whitelisted: check if staking pool is whitelisted
- add_factory / remove_factory: manage factory whitelist
- is_factory_whitelisted: check if factory is whitelisted

Access control: foundation can perform all operations, whitelisted
factories can only add staking pools.

Includes 22 unit tests covering all methods, access control, input
validation, and factory-based staking pool addition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.

[Bounty] Whitelist

1 participant