You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. the type of the result of the readState has changed: https://github.com/warp-contracts/warp#readstate
629
+
630
+
2. the `bundleInteraction` method has been removed. The SDK now decides automatically how the transaction should be posted (based on the environment - i.e. whether the warp instance has been created for mainnet, testnet or local env).
631
+
632
+
3. the internalWrite, if the write itself fails, now throws the `ContractError` by default. There's no longer need to manually check the result of the write inside the contract code (and throw error manually if result.type != 'ok').
633
+
If you want to leave the check in the contract code - set the
634
+
```
635
+
.setEvaluationOptions({
636
+
throwOnInternalWriteError: true
637
+
});
638
+
```
639
+
640
+
4. The warp instance now contains info about the environment - https://github.com/warp-contracts/warp#warpenvironment . This might be useful for writing deployment scripts, etc.
641
+
5. if the `warp` instance was obtained via `WarpFactor.forLocal` (which should be used for local testing with ArLocal), then:
642
+
643
+
* you can use `warp.testing.generateWallet()` for generating the wallet - it returns both the jwk and wallet address - [example](https://github.com/warp-contracts/warp/blob/main/src/__tests__/integration/internal-writes/internal-write-depth.test.ts#L89).
644
+
* you can use `warp.testing.mineBlock()` to manually mine ArLocal blocks
645
+
* the ArLocal blocks are mined automatically after calling `.writeInteraction`. This can be switched off by setting `evaluationOptions.mineArLocalBlocks` to `false` - [example](https://github.com/warp-contracts/warp/blob/main/src/__tests__/integration/internal-writes/internal-write-depth.test.ts#L118).
646
+
628
647
### Examples
629
648
630
-
Usage examples can be found in
631
-
a dedicated [repository](https://github.com/redstone-finance/redstone-smartweave-examples).
632
-
Please follow instructions in its README.md (and detail-ish comments in the examples files) to learn more.
633
-
There is also a separate repository with a web application [example](https://github.com/redstone-finance/redstone-smartcontracts-app).
649
+
We've created an [academy](https://redstone.academy/) that introduces to the process of writing your own SmartWeave contract from scratch and describes how to interact with it using Warp SDK.
634
650
635
-
We've also created an [academy](https://redstone.academy/) that introduces to the process of writing your own SmartWeave contract from scratch and describes how to interact with it using Warp SDK.
651
+
The example usages with different web bundlers and in Node.js env are available [here](https://github.com/warp-contracts/bundlers).
636
652
637
653
A community package - [arweave-jest-fuzzing](https://github.com/Hansa-Network/arweave-jest-fuzzing/blob/master/README.md) has been released thanks to Hansa Network to help SmartWeave developers write fuzzy tests.
0 commit comments