feat: support metadata input on package creation in AidEscrow contract#407
Conversation
- Update and to accept and store metadata - Extend struct to include metadata field - Update contract documentation and comments for metadata support - Refactor all contract tests and integration tests to use new metadata argument - Add/modify tests to verify metadata storage and retrieval - Fix all related syntax and type errors in test files
|
@Oluwaseyi89 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@Cedarich please, approve workflow to run. |
|
Check clippy |
|
@Cedarich everything is okay locally why is clippy failing on github CI? |
…adata-Input-on-Package-Creation
|
Hey @Oluwaseyi89! 👋 Thanks for putting in the work on this metadata feature! There's a small issue in the test that's causing the CI to fail though. In the Quick fix: let package_id = client.create_package(
&operator,
&1,
&recipient,
&1000,
&token,
&86400,
&package_metadata, // ← Add this
);Once you add that, the test should compile and run smoothly! Let me know if you hit any other issues. 🚀 |
|
@Cedarich approve workflow, please. |
Support Metadata Input on Package Creation
Summary
Updates
create_packageandbatch_create_packagesto accept and store metadata instead of always using an empty map.Changes
create_packagesignature to acceptmetadata: MapPackagestruct to include metadata fieldbatch_create_packagesto support metadata per packagesucceeds_with_metadata.1.jsonvalidating metadata storage and retrievalFiles Modified
contracts/aid_escrow/src/lib.rs– Core contract logiccontracts/aid_escrow/tests/*.rs– All test files updated for new signaturecontracts/aid_escrow/test_snapshots/**/*.json– Snapshot updatesEvidence
succeeds_with_metadata.1.jsonaddedTesting
Closes #80