Skip to content

Add inventory tracker contract example#69

Open
alexgduarte wants to merge 1 commit into
athena-consulting:mainfrom
alexgduarte:codex/inventory-tracker-example
Open

Add inventory tracker contract example#69
alexgduarte wants to merge 1 commit into
athena-consulting:mainfrom
alexgduarte:codex/inventory-tracker-example

Conversation

@alexgduarte

Copy link
Copy Markdown

Contributes to #11

Summary

  • Add a new inventory-tracker simple contract example.
  • Let each address manage its own inventory records with sequential per-user item IDs.
  • Support item creation, metadata updates, quantity setting, quantity increases/decreases, deletion, per-user counts, and paginated item listing.
  • Include safe quantity underflow handling, owner-managed maximum item limits, ownership transfer, input validation, README documentation, schema generation, and root README linking.
  • Include eight focused unit tests covering config, listing, metadata updates, quantity accounting, ownership isolation, limits, validation, deletion, and owner controls.

Validation

  • cargo fmt --manifest-path inventory-tracker/Cargo.toml -- --check
  • cargo test --manifest-path inventory-tracker/Cargo.toml --target-dir /private/tmp/codex-inventory-tracker-target
  • git diff --check

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.

1 participant