Skip to content

feat: add metadata_hash field to Escrow struct for IPFS agreement storage#185

Merged
Cedarich merged 1 commit intoStayLitCodes:mainfrom
Fahmedo:feat/ipfs-metadata-hash-133
Mar 30, 2026
Merged

feat: add metadata_hash field to Escrow struct for IPFS agreement storage#185
Cedarich merged 1 commit intoStayLitCodes:mainfrom
Fahmedo:feat/ipfs-metadata-hash-133

Conversation

@Fahmedo
Copy link
Copy Markdown

@Fahmedo Fahmedo commented Mar 30, 2026

Summary

Closes #133

Adds IPFS metadata hash support to the escrow contract, allowing users to link a decentralized agreement stored on IPFS directly to an on-chain escrow.

Changes

  • Escrow struct: Added metadata_hash: BytesN<32> field
  • EscrowEntryV2 struct: Added metadata_hash: BytesN<32> field
  • create_escrow: Now accepts metadata_hash: BytesN<32> parameter
  • CreateEscrowRequest: Added metadata_hash field for batch creation
  • EscrowCreated event: Payload now includes metadata_hash
  • Legacy migration: Existing escrows default to zero hash ([0u8; 32])
  • Tests: All 61 tests updated and passing

CI

  • cargo fmt passes
  • cargo clippy -- -D warnings passes
  • cargo test — 61 passed, 0 failed

…rage

Closes StayLitCodes#133

- Add `metadata_hash: BytesN<32>` to `Escrow` struct and `EscrowEntryV2`
- Update `create_escrow` to accept `metadata_hash` parameter
- Update `CreateEscrowRequest` struct with `metadata_hash` field
- Include `metadata_hash` in `EscrowCreated` event payload
- Legacy escrow migration defaults to zero hash ([0u8; 32])
- Update all tests to pass metadata_hash argument
@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@Fahmedo 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! 🚀

Learn more about application limits

@Cedarich Cedarich merged commit f3e1279 into StayLitCodes:main Mar 30, 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.

[Feature] IPFS Metadata Storage for Escrow Agreements

2 participants