Skip to content

Fix issue 274#528

Closed
razeprasine wants to merge 3 commits into
accesslayerorg:mainfrom
razeprasine:fix-issue-274
Closed

Fix issue 274#528
razeprasine wants to merge 3 commits into
accesslayerorg:mainfrom
razeprasine:fix-issue-274

Conversation

@razeprasine

Copy link
Copy Markdown
Contributor

Summary

  • Removed duplicate transfer_keys entrypoint — the old version with non-standard parameter order (env, from, to, creator, amount) was replaced by the canonical (env, creator, from, to, amount) version that follows the contract's API convention. The duplicate caused 9 compilation errors from the #[contractimpl] macro.
  • Added sequential creator-supply test — test_creator_supply_accumulates_across_sequential_buys in creator_supply.rs performs 3 sequential buys, reads get_creator_supply after each, and asserts cumulative totals match.
  • Fixed peer_to_peer_transfer_supply_regression.rs — updated transfer_keys call site to use the new parameter order.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace
  • All transfer_keys tests pass: 6 unit + 12 integration + 1 regression
  • All creator_supply tests pass: 4/4 (3 existing + 1 new)
  • cargo check compiles cleanly

Checklist

  • Linked issue or backlog item
  • 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

Closes #274

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 unit tests for creator supply read after multiple sequential buys

1 participant