Skip to content

Add integration test confirming sell reverts when holder attempts to sell more keys than they own #554

Description

@Chucks1093

Summary

The sell function should revert if a holder tries to sell a quantity greater than their current balance. An integration test should cover this path, verify the error code, and confirm no keys were deducted from the holder's balance.

Scope

  • Set up a holder with exactly 2 keys via buy transactions
  • Invoke sell with quantity 3
  • Assert the transaction reverts with the correct insufficient-balance error code
  • Assert the holder still owns exactly 2 keys after the failed sell

Acceptance Criteria

  • Transaction reverts when sell quantity exceeds holder balance
  • Error code matches the insufficient-balance variant
  • Holder balance unchanged at 2 after the failed sell
  • Creator supply unchanged after the failed sell

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions