Releases: warp-contracts/warp
v1.4.21
v1.4.20
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
- feat: events by @ppedziwiatr in #463
Full Changelog: v1.4.19...v1.4.20
v1.4.19
What's Changed
- fix: ETH caller is set incorrectly when in strict mode by @asiaziola in #461
- Twl/some of them intermediate sortkey commits se by @Tadeuchi in #462
Full Changelog: v1.4.18...v1.4.19
v1.4.18
v1.4.17
What's Changed
Full Changelog: v1.4.16...v1.4.17
v1.4.16
What's Changed
Full Changelog: v1.4.15...v1.4.16
v1.4.15
What's Changed
- fix: wait for confirmation return value by @szynwelski in #439
- feat: wrap fetchRemoteContractState in getJsonResponse
Full Changelog: v1.4.14...v1.4.15
v1.4.14
What's Changed
- fix: it should be possible to pass jwk to connect method when in browser by @asiaziola in #431
- feat: move up caller to the view state method by @Tadeuchi in #433
- feat: replace data item with warp arbundles implementation by @asiaziola in #434
Full Changelog: v1.4.13...v1.4.14
Interactions sent as data items when bundling is enabled
This release introduce new way of creating and signing interactions when bundling is enabled and interactions are sent to Warp Sequencer. Interactions are sent as data items instead of native Arweave transactions. Thanks to that interactions can be bundled in a top-level bundle by Warp Sequencer (using nested bundles concept).
Nothing has changed in a way Warp Sequencer adds a sequence to the bundle containing interaction data item (same sort key rule apply). Nested bundling however allows an easy retrieval of the interaction transaction from Arweave gateway and Arweave GQL. More info about how the interaction data items are wrapped in a bundle, what tags are added, how we upload to it to Bundlr and how to easy retrieve the transaction in Warp Academy.
From the client perspective almost nothing is changing except for the signing perspective.
Interactions sent through Warp Sequencer
- If user wants to sign interaction server-side with Arweave wallet, he/she needs to connect wallet same way as previously:
const contract = warp.contract(contract_id).connect(jwk);
- If user wants to use some custom signing (like signing with Arweave wallet in browser, signing with Ethereum wallet server-side or signing with Ethereum wallet in browser),
warp-contracts-plugin-signature
is needed. More info and example implementations in this section of Warp Academy. - More custom implementation requires implementation of
Signer
class (https://github.com/warp-contracts/warp-arbundles/blob/main/src/signing/Signer.ts), an example implementation for ArweaveSigner here. Please note that previous way of custom signing has been switched off when bundling is enabled.
Interaction sent directly to Arweave
Rules for signing process have not changed for L1 transactions. Please use it the old way.
What's Changed
- feat: interaction data item by @asiaziola in #430
Full Changelog: v1.4.12...v1.4.13
evaluation vs manifest options fix
The release fixes #425
What's Changed
- fix: [BUG] unsafeClient evaluationOptions vs manifest #425 by @ppedziwiatr in #427
Full Changelog: v1.4.11...v1.4.12