Skip to content

feat: standardize escrow contract event schema and topics#322

Open
Chrisbankz0 wants to merge 2 commits into
stemscreatives:mainfrom
Chrisbankz0:refactor/standardize-contract-events
Open

feat: standardize escrow contract event schema and topics#322
Chrisbankz0 wants to merge 2 commits into
stemscreatives:mainfrom
Chrisbankz0:refactor/standardize-contract-events

Conversation

@Chrisbankz0

Copy link
Copy Markdown

#closes
#318
Summary
Standardized escrow contract event emission so backend indexers can consume a strict, consistent topic schema.

What changed
events.rs

Added a dedicated escrow event schema module.
Defined a fixed primary topic: Escrow.
Standardized secondary event types:
Initialized
Funded
Released
Reclaimed
DisputeInitiated
DisputeResolved
Cleanup
Added structured payload types for each event.
lib.rs
Rewired all env.events().publish(...) calls to use the new standardized topics tuple:
(Escrow, , engagement_id)
Replaced legacy local event definitions with imports from the new events.rs module.
README.md

Documented the escrow event schema and topics for backend developers and indexers.

Why
Provides a consistent event namespace for all escrow lifecycle events.
Makes on-chain event consumption easier and more reliable for the FastAPI backend or other indexer services.
Reduces event handling ambiguity and supports a standardized contract event contract.
Testing
Recommended commands:

cd contracts
cargo test -p escrow
cargo build --release --target wasm32-unknown-unknown
Note: In the current editor environment, cargo was not available on the terminal PATH, so tests were not executed here.

Files changed
events.rs
lib.rs
README.md

#closes

@ohamamarachi474-del

Copy link
Copy Markdown
Contributor

@Chrisbankz0 please look in to ci fail and after wards ill review

@Chrisbankz0

Copy link
Copy Markdown
Author

i've resolved it

@ohamamarachi474-del

Copy link
Copy Markdown
Contributor

@Chrisbankz0

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.

2 participants