Skip to content

test: add integration test for buy transaction reverting on insuffici…#569

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Killerjunior:test/buy-insufficient-xlm-revert
Jul 23, 2026
Merged

test: add integration test for buy transaction reverting on insuffici…#569
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
Killerjunior:test/buy-insufficient-xlm-revert

Conversation

@Killerjunior

Copy link
Copy Markdown
Contributor

test: add integration test for buy transaction reverting on insufficient XLM (#551)

Closes #551

Summary

  • Added an integration test in creator-keys/tests/buy_insufficient_xlm_revert.rs to verify that buy_key cleanly reverts with ContractError::InsufficientPayment when the attached amount is 1 stroop below the current bonding curve price.
  • Verified that key total supply and buyer holdings remain completely unchanged after the transaction reverts (no state mutation).

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

Checklist

  • Linked issue or backlog item (Add integration test for buy transaction reverting when buyer sends insufficient XLM #551)
  • Added or updated creator-keys unit/integration tests for every changed contract behavior, including failure paths for new or reachable ContractError variants
  • Ran cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, and cargo test --workspace, or explained exactly why a command was not run
  • Reviewed persistent storage changes against docs/storage-key-invariants.md; any storage layout change includes a migration/backward-compatibility note
  • Confirmed event names, topic order, payload field order, and field meanings remain compatible with docs/contract-event-conventions.md, or documented the breaking change and versioning plan
  • Updated docs for any changed public contract interface, read-only method, event schema, storage behavior, fee logic, or deployment workflow
  • Scope stays limited to one contract concern and does not include unrelated formatting, lockfile, generated artifact, or dependency changes

@Chucks1093
Chucks1093 merged commit 73e9543 into accesslayerorg:main Jul 23, 2026
1 check 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.

Add integration test for buy transaction reverting when buyer sends insufficient XLM

2 participants