Skip to content

Add unit tests for the contract rejecting any call from a wallet that has been blacklisted by the admin #700

Description

@Chucks1093

Summary

The admin can blacklist a wallet address to block it from buying, selling, or registering as a creator. Unit tests should confirm blacklisted wallets are rejected across all mutating functions and that removing the wallet from the blacklist restores access.

Scope

  • Blacklist a wallet and attempt a buy — assert it panics with wallet_blacklisted
  • Blacklist a wallet and attempt a sell — assert it panics with wallet_blacklisted
  • Blacklist a wallet and attempt creator registration — assert it panics with wallet_blacklisted
  • Remove the wallet from the blacklist and assert a buy succeeds
  • Assert a non-admin wallet cannot add or remove addresses from the blacklist

Acceptance Criteria

  • Blacklisted wallet panics with wallet_blacklisted on buy
  • Blacklisted wallet panics with wallet_blacklisted on sell
  • Blacklisted wallet panics with wallet_blacklisted on registration
  • Removing from blacklist restores full access
  • Non-admin cannot modify the blacklist

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions