Skip to content

v1.4.20

Compare
Choose a tag to compare
@ppedziwiatr ppedziwiatr released this 18 Oct 10:56
· 76 commits to main since this release

Starting from this release, state changing functions in JavaScript contracts can now return 'event' object with some arbitrary data.
If such event is returned by the handle function, the SDK will dispatch it using warp.eventTarget.

Example in contract code:
https://github.com/warp-contracts/warpy/blob/main/contracts/src/warpDiscordBot/points/write/addPoints.ts#L46

Example usage:
https://github.com/warp-contracts/warp/blob/main/src/__tests__/integration/basic/pst.test.ts#L121

One example use case is aggregating some data (i.e. within D.R.E. node) that you don't want to store in the state itself and/or notifying about some 'actions' (e.g. changing user role).

What's Changed

Full Changelog: v1.4.19...v1.4.20