Skip to content

feat(compliance): add tiered allowlist with allow_address_with_tier#155

Merged
misrasamuelisiguzor-oss merged 2 commits into
WHEELBACK:mainfrom
omonxooo-commits:feature/compliance-address-tier
Jun 26, 2026
Merged

feat(compliance): add tiered allowlist with allow_address_with_tier#155
misrasamuelisiguzor-oss merged 2 commits into
WHEELBACK:mainfrom
omonxooo-commits:feature/compliance-address-tier

Conversation

@omonxooo-commits

Copy link
Copy Markdown
Contributor

Summary

Adds on-chain compliance tier support to the compliance contract.

Changes

allowlist.rs

  • New DataKey::Tier(Address) variant for per-address tier storage.

lib.rs

  • allow_address_with_tier(env, admin, address, tier: u8) — allows an address and records its KYC/AML tier (0 = basic, higher = enhanced/institutional). Removes any existing expiry so the allow is permanent. Enforces admin auth and paused guard.
  • get_address_tier(env, address) -> u8 — returns the stored tier, defaulting to 0 if unset.

compliance_test.rs

  • 5 new tests covering: tier is set and address is allowed, default tier is 0, tier overwrites, non-admin rejected, paused contract rejected.

Design notes

  • Tier storage is independent of the Allowed flag — is_allowed logic is unchanged.
  • The treasury contract can call get_address_tier to enforce per-tier settlement limits without off-chain checks.

Closes #71

@drips-wave

drips-wave Bot commented Jun 25, 2026

Copy link
Copy Markdown

@omonxooo-commits 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

@misrasamuelisiguzor-oss
misrasamuelisiguzor-oss merged commit 06ed4a2 into WHEELBACK:main Jun 26, 2026
0 of 7 checks passed
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.

feat(compliance): add allow_address_with_tier for tiered compliance levels

2 participants