Skip to content

Commit f2a8492

Browse files
committed
docs: docs upgrade
1 parent 7060d37 commit f2a8492

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ If you are interested in the main assumptions for Warp ecosystem as well as its
3434
- [VM2](#vm2)
3535
- [Internal writes](#internal-writes)
3636
- [UnsafeClient](#unsafeclient)
37-
- [Performance - best practices](#performance---best-practices)
3837
- [Examples](#examples)
3938
- [Migrations](#migrations)
4039
- [Old factories to WarpFactory](#old-factories-to-warpfactory)
4140
- [Sqlite to LevelDB](#sqlite-to-leveldb)
42-
- [Examples](#examples)
41+
- [Additional changes](#additional-changes)
4342
- [Warp transaction lifecycle](#warp-transaction-lifecycle)
4443

4544
## Development
@@ -625,14 +624,31 @@ const result = await warp.migrationTool.migrateSqlite('./tools/sqlite/contracts-
625624
yarn ts-node -r tsconfig-paths/register tools/migrate.ts
626625
```
627626
627+
#### Additional changes
628+
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+
628647
### Examples
629648
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.
634650
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).
636652
637653
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.
638654

0 commit comments

Comments
 (0)