Skip to content

Add integration test for buy transaction reverting when contract is paused #643

Description

@Chucks1093

Summary

If the contract supports a paused state, buy and sell transactions should revert while paused. An integration test should pause the contract via the admin function and confirm buy reverts with the correct paused error code, then unpause and confirm buy succeeds.

Scope

  • Initialize the contract and pause it via the admin pause function
  • Invoke buy and assert the transaction reverts with the paused error code
  • Invoke sell and assert it also reverts with the paused error code
  • Unpause the contract and assert a subsequent buy succeeds
  • Assert no supply or balance changes occur while the contract is paused

Acceptance Criteria

  • Buy reverts with paused error code when contract is paused
  • Sell reverts with paused error code when contract is paused
  • No state changes occur while paused
  • Buy succeeds after contract is unpaused

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions