@oceanprotocol/lib 3.4.1 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +81 -8
  2. package/CodeExamples.md +31 -11
  3. package/ComputeExamples.md +7 -3
  4. package/dist/lib.js +1 -1
  5. package/dist/lib.js.map +1 -1
  6. package/dist/lib.modern.js +1 -1
  7. package/dist/lib.modern.js.map +1 -1
  8. package/dist/lib.module.js +1 -1
  9. package/dist/lib.module.js.map +1 -1
  10. package/dist/lib.umd.js +1 -1
  11. package/dist/lib.umd.js.map +1 -1
  12. package/dist/types/@types/Asset.d.ts +148 -0
  13. package/dist/types/@types/Compute.d.ts +71 -0
  14. package/dist/types/@types/Contracts.d.ts +26 -0
  15. package/dist/types/@types/DDO/ConsumerParameter.d.ts +37 -0
  16. package/dist/types/@types/DDO/Credentials.d.ts +8 -0
  17. package/dist/types/@types/DDO/DDO.d.ts +55 -0
  18. package/dist/types/@types/DDO/Event.d.ts +27 -0
  19. package/dist/types/@types/DDO/Metadata.d.ts +141 -0
  20. package/dist/types/@types/DDO/Service.d.ts +106 -0
  21. package/dist/types/@types/Datatoken.d.ts +42 -0
  22. package/dist/types/@types/Dispenser.d.ts +16 -0
  23. package/dist/types/@types/DownloadResponse.d.ts +4 -0
  24. package/dist/types/@types/File.d.ts +89 -0
  25. package/dist/types/@types/FileInfo.d.ts +43 -0
  26. package/dist/types/@types/FixedPrice.d.ts +51 -0
  27. package/dist/types/@types/NFT.d.ts +18 -0
  28. package/dist/types/@types/NFTFactory.d.ts +20 -0
  29. package/dist/types/@types/Provider.d.ts +33 -0
  30. package/dist/types/@types/ReturnTypes.d.ts +3 -0
  31. package/dist/types/@types/Router.d.ts +59 -0
  32. package/dist/types/@types/index.d.ts +20 -0
  33. package/dist/types/config/Config.d.ts +162 -0
  34. package/dist/types/config/ConfigHelper.d.ts +13 -0
  35. package/dist/types/config/index.d.ts +2 -0
  36. package/dist/types/contracts/AccessList.d.ts +85 -0
  37. package/dist/types/contracts/AccessListFactory.d.ts +56 -0
  38. package/dist/types/contracts/Datatoken.d.ts +278 -0
  39. package/dist/types/contracts/Datatoken4.d.ts +72 -0
  40. package/dist/types/contracts/Dispenser.d.ts +73 -0
  41. package/dist/types/contracts/FixedRateExchange.d.ts +209 -0
  42. package/dist/types/contracts/NFT.d.ts +227 -0
  43. package/dist/types/contracts/NFTFactory.d.ts +165 -0
  44. package/dist/types/contracts/Router.d.ts +107 -0
  45. package/dist/types/contracts/SmartContract.d.ts +46 -0
  46. package/dist/types/contracts/SmartContractWithAddress.d.ts +17 -0
  47. package/dist/types/contracts/df/DfRewards.d.ts +31 -0
  48. package/dist/types/contracts/df/DfStrategyV1.d.ts +21 -0
  49. package/dist/types/contracts/index.d.ts +20 -0
  50. package/dist/types/contracts/ve/VeAllocate.d.ts +38 -0
  51. package/dist/types/contracts/ve/VeFeeDistributor.d.ts +29 -0
  52. package/dist/types/contracts/ve/VeFeeEstimate.d.ts +14 -0
  53. package/dist/types/contracts/ve/VeOcean.d.ts +68 -0
  54. package/dist/types/index.d.ts +5 -0
  55. package/dist/types/services/Aquarius.d.ts +53 -0
  56. package/dist/types/services/Provider.d.ts +197 -0
  57. package/dist/types/services/index.d.ts +2 -0
  58. package/dist/types/utils/Assets.d.ts +56 -0
  59. package/dist/types/utils/Constants.d.ts +4 -0
  60. package/dist/types/utils/ContractUtils.d.ts +46 -0
  61. package/dist/types/utils/DatatokenName.d.ts +14 -0
  62. package/dist/types/utils/DdoHelpers.d.ts +13 -0
  63. package/dist/types/utils/FetchHelper.d.ts +14 -0
  64. package/dist/types/utils/General.d.ts +5 -0
  65. package/dist/types/utils/Logger.d.ts +19 -0
  66. package/dist/types/utils/OrderUtils.d.ts +20 -0
  67. package/dist/types/utils/ProviderErrors.d.ts +1 -0
  68. package/dist/types/utils/SignatureUtils.d.ts +12 -0
  69. package/dist/types/utils/TokenUtils.d.ts +70 -0
  70. package/dist/types/utils/index.d.ts +13 -0
  71. package/dist/types/utils/minAbi.d.ts +38 -0
  72. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -4,11 +4,27 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v3.4.3](https://github.com/oceanprotocol/ocean.js/compare/v3.4.2...v3.4.3)
8
+
9
+ - Add checks for ddo chain id and did. [`#1868`](https://github.com/oceanprotocol/ocean.js/pull/1868)
10
+ - generate types to dist/types [`#1862`](https://github.com/oceanprotocol/ocean.js/pull/1862)
11
+ - fix tests tsconfig path in eslint [`bae1874`](https://github.com/oceanprotocol/ocean.js/commit/bae18749bf96d8cc34592aa6dd271b7c1fd6dbfb)
12
+
13
+ #### [v3.4.2](https://github.com/oceanprotocol/ocean.js/compare/v3.4.1...v3.4.2)
14
+
15
+ > 16 October 2024
16
+
17
+ - Add confidential EVM flag when creating a datatoken 4 in NFT class [`#1859`](https://github.com/oceanprotocol/ocean.js/pull/1859)
18
+ - Release 3.4.2 [`0e42ce3`](https://github.com/oceanprotocol/ocean.js/commit/0e42ce3f64413b5a88532c1fe22eb76fb3823968)
19
+
7
20
  #### [v3.4.1](https://github.com/oceanprotocol/ocean.js/compare/v3.4.0...v3.4.1)
8
21
 
22
+ > 9 October 2024
23
+
9
24
  - Updating oasis exports [`#1860`](https://github.com/oceanprotocol/ocean.js/pull/1860)
10
25
  - Fix ipfs CID. [`#1851`](https://github.com/oceanprotocol/ocean.js/pull/1851)
11
26
  - chore: get router factory address from config [`#1858`](https://github.com/oceanprotocol/ocean.js/pull/1858)
27
+ - Release 3.4.1 [`cc91e1d`](https://github.com/oceanprotocol/ocean.js/commit/cc91e1d376090137b7f92214a2085ea9b24a974e)
12
28
 
13
29
  #### [v3.4.0](https://github.com/oceanprotocol/ocean.js/compare/v3.3.4-next.0...v3.4.0)
14
30
 
@@ -140,15 +156,29 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
140
156
  - make sure we increment a number when working with nonces [`#1781`](https://github.com/oceanprotocol/ocean.js/pull/1781)
141
157
  - Release 3.1.4 [`b2e2cf2`](https://github.com/oceanprotocol/ocean.js/commit/b2e2cf24293af07f597c25e3a3e392db9caa381a)
142
158
 
143
- #### [v3.1.3](https://github.com/oceanprotocol/ocean.js/compare/v3.1.2...v3.1.3)
159
+ #### [v3.1.3](https://github.com/oceanprotocol/ocean.js/compare/v3.1.3-next.1...v3.1.3)
144
160
 
145
161
  > 16 October 2023
146
162
 
147
163
  - fix fs use & error handling [`#1777`](https://github.com/oceanprotocol/ocean.js/pull/1777)
148
164
  - Bump postcss from 8.4.5 to 8.4.31 [`#1778`](https://github.com/oceanprotocol/ocean.js/pull/1778)
165
+ - Release 3.1.3 [`1bc5a39`](https://github.com/oceanprotocol/ocean.js/commit/1bc5a39fda217c91cf5c44f41c6275acd20740de)
166
+
167
+ #### [v3.1.3-next.1](https://github.com/oceanprotocol/ocean.js/compare/v3.1.3-next.0...v3.1.3-next.1)
168
+
169
+ > 11 October 2023
170
+
171
+ - update error handling [`aada8e9`](https://github.com/oceanprotocol/ocean.js/commit/aada8e92af9273ccc20e86dc00ea73bcb7e8dfdf)
172
+ - Release 3.1.3-next.1 [`40c22b9`](https://github.com/oceanprotocol/ocean.js/commit/40c22b9b1fa147fd4295da1bdd6248d7714a2b30)
173
+
174
+ #### [v3.1.3-next.0](https://github.com/oceanprotocol/ocean.js/compare/v3.1.2...v3.1.3-next.0)
175
+
176
+ > 6 October 2023
177
+
149
178
  - Bump @types/crypto-js from 4.1.1 to 4.1.2 [`#1774`](https://github.com/oceanprotocol/ocean.js/pull/1774)
150
179
  - Bump @types/chai-spies from 1.0.3 to 1.0.4 [`#1776`](https://github.com/oceanprotocol/ocean.js/pull/1776)
151
- - Release 3.1.3 [`1bc5a39`](https://github.com/oceanprotocol/ocean.js/commit/1bc5a39fda217c91cf5c44f41c6275acd20740de)
180
+ - fix fs use [`735dc2f`](https://github.com/oceanprotocol/ocean.js/commit/735dc2f62b976be683bc9fcd7f8940e715b18519)
181
+ - Release 3.1.3-next.0 [`5ac5d1f`](https://github.com/oceanprotocol/ocean.js/commit/5ac5d1f44a637b5d8d285757941b0393bb3a7983)
152
182
 
153
183
  #### [v3.1.2](https://github.com/oceanprotocol/ocean.js/compare/v3.1.1...v3.1.2)
154
184
 
@@ -207,13 +237,21 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
207
237
  - Merge 8699e4a8bb30b3ecb7ee894412ebe85267fddd67 into ae2ff1ccde53ace9841844c316a855de271f9a3f [`9da0268`](https://github.com/oceanprotocol/ocean.js/commit/9da0268be6ddfb1e4f110ee48725e8c9a492f6fb)
208
238
  - Adding tests to check if the number of decimals is correct for the publishMarketFee [`8699e4a`](https://github.com/oceanprotocol/ocean.js/commit/8699e4a8bb30b3ecb7ee894412ebe85267fddd67)
209
239
 
210
- #### [v3.0.1](https://github.com/oceanprotocol/ocean.js/compare/v3.0.0...v3.0.1)
240
+ #### [v3.0.1](https://github.com/oceanprotocol/ocean.js/compare/v3.0.1-next.0...v3.0.1)
211
241
 
212
242
  > 6 June 2023
213
243
 
214
244
  - set min gas fee 30 gwei on priority fees for polygon and mumbai as well [`#1736`](https://github.com/oceanprotocol/ocean.js/pull/1736)
215
245
  - Release 3.0.1 [`ae2ff1c`](https://github.com/oceanprotocol/ocean.js/commit/ae2ff1ccde53ace9841844c316a855de271f9a3f)
216
246
 
247
+ #### [v3.0.1-next.0](https://github.com/oceanprotocol/ocean.js/compare/v3.0.0...v3.0.1-next.0)
248
+
249
+ > 31 May 2023
250
+
251
+ - Release 3.0.1-next.0 [`b670073`](https://github.com/oceanprotocol/ocean.js/commit/b67007363a8e2a3b640411c3b6471edeacdf5d19)
252
+ - Merge 04deabccd3ffbc8d3620e42a8b1bc4a2d5019e54 into 543f71f7cda1b3d0099cc26975d34b89bead7452 [`c33663c`](https://github.com/oceanprotocol/ocean.js/commit/c33663cfdbf501c407d3e1e17f56b17761f9e556)
253
+ - set min gas fee 30 gwei on priority fees for polygon and mumbai as well [`04deabc`](https://github.com/oceanprotocol/ocean.js/commit/04deabccd3ffbc8d3620e42a8b1bc4a2d5019e54)
254
+
217
255
  #### [v3.0.0](https://github.com/oceanprotocol/ocean.js/compare/v3.0.0-next.5...v3.0.0)
218
256
 
219
257
  > 29 May 2023
@@ -283,7 +321,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
283
321
  - more cleanup and jsdoc updates [`967f664`](https://github.com/oceanprotocol/ocean.js/commit/967f6642fb1a0cf9c20d4f4fa28d36527d8e43ba)
284
322
  - Updating CodeExamples.md [`815ee37`](https://github.com/oceanprotocol/ocean.js/commit/815ee37c52f9aa64f2cac4948fb137f447d1c6b4)
285
323
 
286
- #### [v2.7.0](https://github.com/oceanprotocol/ocean.js/compare/v2.6.3...v2.7.0)
324
+ #### [v2.7.0](https://github.com/oceanprotocol/ocean.js/compare/v2.7.0-next.2...v2.7.0)
287
325
 
288
326
  > 20 March 2023
289
327
 
@@ -294,6 +332,29 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
294
332
  - Updated copyright year. [`#1700`](https://github.com/oceanprotocol/ocean.js/pull/1700)
295
333
  - Release 2.7.0 [`a2e9901`](https://github.com/oceanprotocol/ocean.js/commit/a2e9901697b32c6aaaa489c3bec1a19fcfa185ab)
296
334
 
335
+ #### [v2.7.0-next.2](https://github.com/oceanprotocol/ocean.js/compare/v2.7.0-next.1...v2.7.0-next.2)
336
+
337
+ > 22 February 2023
338
+
339
+ - Release 2.7.0-next.2 [`2687751`](https://github.com/oceanprotocol/ocean.js/commit/26877517ff8a7537729e37cf6c68260ca3b3bcf4)
340
+ - fix isValid provider method [`010306c`](https://github.com/oceanprotocol/ocean.js/commit/010306c92e003021b08df0b8b8ad6743ae6b240c)
341
+
342
+ #### [v2.7.0-next.1](https://github.com/oceanprotocol/ocean.js/compare/v2.7.0-next.0...v2.7.0-next.1)
343
+
344
+ > 22 February 2023
345
+
346
+ - Release 2.7.0-next.0 [`500062b`](https://github.com/oceanprotocol/ocean.js/commit/500062beb575b21ab7210a675bdf5174d11842c8)
347
+ - Updating CodeExamples.md [`6cc891a`](https://github.com/oceanprotocol/ocean.js/commit/6cc891a5da9e4042e3eee243b651e8a7188d1786)
348
+ - Release 2.7.0-next.1 [`ba27412`](https://github.com/oceanprotocol/ocean.js/commit/ba2741296167de4c112560f2807b1a45e86eba94)
349
+
350
+ #### [v2.7.0-next.0](https://github.com/oceanprotocol/ocean.js/compare/v2.6.3...v2.7.0-next.0)
351
+
352
+ > 21 February 2023
353
+
354
+ - add needed multichain provider changes [`95551ee`](https://github.com/oceanprotocol/ocean.js/commit/95551eeb669395357149dd923ecec304955add14)
355
+ - Release 2.7.0-next.0 [`95886a1`](https://github.com/oceanprotocol/ocean.js/commit/95886a184faadd4a13e857e285e016ef4c20966f)
356
+ - fix code example [`c4a00e4`](https://github.com/oceanprotocol/ocean.js/commit/c4a00e45848ace6a4fe3d4fa1a2aeac518aa44ce)
357
+
297
358
  #### [v2.6.3](https://github.com/oceanprotocol/ocean.js/compare/v2.6.2...v2.6.3)
298
359
 
299
360
  > 13 February 2023
@@ -595,7 +656,21 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
595
656
  - Bump typedoc from 0.22.15 to 0.22.17 [`#1514`](https://github.com/oceanprotocol/ocean.js/pull/1514)
596
657
  - Release 1.1.3 [`7772e93`](https://github.com/oceanprotocol/ocean.js/commit/7772e9387ef9d63f98ea80cfd4eefbea963dd0ad)
597
658
 
598
- #### [v1.1.2](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0...v1.1.2)
659
+ #### [v1.1.2](https://github.com/oceanprotocol/ocean.js/compare/v1.1.1...v1.1.2)
660
+
661
+ > 15 June 2022
662
+
663
+ - Release 1.1.2 [`85bf271`](https://github.com/oceanprotocol/ocean.js/commit/85bf2716e26d8691aeb9d5504e563d557419dc2e)
664
+ - manual bump fix [`5674a54`](https://github.com/oceanprotocol/ocean.js/commit/5674a547d1d367ce88b3595f0be8ebbf12274266)
665
+
666
+ #### [v1.1.1](https://github.com/oceanprotocol/ocean.js/compare/v1.1.0...v1.1.1)
667
+
668
+ > 15 June 2022
669
+
670
+ - Release 1.1.1 [`ea48e01`](https://github.com/oceanprotocol/ocean.js/commit/ea48e015ac8299f71d57a929f8f30c5d1a8446e7)
671
+ - manual bump fix [`a362410`](https://github.com/oceanprotocol/ocean.js/commit/a36241004b1d9578ec5c02d9d6e64d9750c53a7b)
672
+
673
+ #### [v1.1.0](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0...v1.1.0)
599
674
 
600
675
  > 15 June 2022
601
676
 
@@ -603,9 +678,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
603
678
  - Bump @types/node from 17.0.35 to 17.0.44 [`#1513`](https://github.com/oceanprotocol/ocean.js/pull/1513)
604
679
  - Bump eslint-config-oceanprotocol from 1.5.0 to 2.0.1 [`#1466`](https://github.com/oceanprotocol/ocean.js/pull/1466)
605
680
  - update to new schema & compute fixes [`#1510`](https://github.com/oceanprotocol/ocean.js/pull/1510)
606
- - Release 1.1.2 [`85bf271`](https://github.com/oceanprotocol/ocean.js/commit/85bf2716e26d8691aeb9d5504e563d557419dc2e)
607
- - manual bump fix [`5674a54`](https://github.com/oceanprotocol/ocean.js/commit/5674a547d1d367ce88b3595f0be8ebbf12274266)
608
- - manual bump fix [`a362410`](https://github.com/oceanprotocol/ocean.js/commit/a36241004b1d9578ec5c02d9d6e64d9750c53a7b)
681
+ - Release 1.1.0 [`112c27e`](https://github.com/oceanprotocol/ocean.js/commit/112c27edab58ef0681ea3e87fb09978411924753)
609
682
 
610
683
  #### [v1.0.0](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0-next.45...v1.0.0)
611
684
 
package/CodeExamples.md CHANGED
@@ -167,7 +167,7 @@ Next, we define the metadata that will describe our data asset. This is what we
167
167
  '@context': ['https://w3id.org/did/v1'],
168
168
  id: '',
169
169
  version: '4.1.0',
170
- chainId: 4,
170
+ chainId: 8996,
171
171
  nftAddress: '0x0',
172
172
  metadata: {
173
173
  created: '2021-12-20T14:35:20Z',
@@ -289,7 +289,11 @@ you need to mint oceans to mentioned accounts only if you are using barge to tes
289
289
 
290
290
  ### 6.1 Publish a dataset (create NFT + Datatoken) with a fixed rate exchange
291
291
  ```Typescript
292
- const factory = new NftFactory(addresses.ERC721Factory, publisherAccount)
292
+ const factory = new NftFactory(
293
+ addresses.ERC721Factory,
294
+ publisherAccount,
295
+ await publisherAccount.getChainId()
296
+ )
293
297
 
294
298
  const nftParams: NftCreateData = {
295
299
  name: FRE_NFT_NAME,
@@ -409,7 +413,11 @@ Now let's console log the DID to check everything is working
409
413
 
410
414
  ### 6.3 Marketplace displays fixed rate asset for sale
411
415
  ```Typescript
412
- const fixedRate = new FixedRateExchange(freAddress, publisherAccount)
416
+ const fixedRate = new FixedRateExchange(
417
+ freAddress,
418
+ publisherAccount,
419
+ await publisherAccount.getChainId()
420
+ )
413
421
  const oceanAmount = await (
414
422
  await fixedRate.calcBaseInGivenDatatokensOut(freId, '1')
415
423
  ).baseTokenAmount
@@ -424,7 +432,7 @@ Now that the market has fetched those values it can display the asset on the fro
424
432
 
425
433
  ### 7.1 Consumer buys a fixed rate asset data asset, and downloads it
426
434
  ```Typescript
427
- datatoken = new Datatoken(publisherAccount)
435
+ datatoken = new Datatoken(publisherAccount, await publisherAccount.getChainId())
428
436
  const DATATOKEN_AMOUNT = '10000'
429
437
 
430
438
  await datatoken.mint(
@@ -473,7 +481,11 @@ Before we call the contract we have to call `approve` so that the contract can m
473
481
  DATATOKEN_AMOUNT
474
482
  )
475
483
 
476
- const fixedRate = new FixedRateExchange(freAddress, consumerAccount)
484
+ const fixedRate = new FixedRateExchange(
485
+ freAddress,
486
+ consumerAccount,
487
+ await consumerAccount.getChainId()
488
+ )
477
489
  ```
478
490
  Now we can make the contract call
479
491
  ```Typescript
@@ -517,7 +529,7 @@ Next, we need to initialize the provider
517
529
  validUntil: initializeData.providerFee.validUntil
518
530
  }
519
531
 
520
- datatoken = new Datatoken(consumerAccount)
532
+ datatoken = new Datatoken(consumerAccount, await consumerAccount.getChainId())
521
533
 
522
534
  ```
523
535
  Lets now make the payment
@@ -574,7 +586,11 @@ Lets check that the download URL was successfully received
574
586
 
575
587
  ### 8.1 Publish a dataset (create NFT + Datatoken) with a dispenser
576
588
  ```Typescript
577
- const factory = new NftFactory(addresses.ERC721Factory, publisherAccount)
589
+ const factory = new NftFactory(
590
+ addresses.ERC721Factory,
591
+ publisherAccount,
592
+ await publisherAccount.getChainId()
593
+ )
578
594
 
579
595
  const nftParams: NftCreateData = {
580
596
  name: DISP_NFT_NAME,
@@ -679,8 +695,12 @@ Now we need to encrypt file(s) using provider
679
695
 
680
696
  ### 9.1 Consumer gets a dispenser data asset, and downloads it
681
697
  ```Typescript
682
- datatoken = new Datatoken(publisherAccount)
683
- const dispenser = new Dispenser(addresses.Dispenser, consumerAccount)
698
+ datatoken = new Datatoken(publisherAccount, await publisherAccount.getChainId())
699
+ const dispenser = new Dispenser(
700
+ addresses.Dispenser,
701
+ consumerAccount,
702
+ await consumerAccount.getChainId()
703
+ )
684
704
 
685
705
  let consumerDTBalance = await balance(
686
706
  consumerAccount,
@@ -709,7 +729,7 @@ Now we need to encrypt file(s) using provider
709
729
  const resolvedDDO = await aquarius.waitForAqua(fixedDDO.id)
710
730
  assert(resolvedDDO, 'Cannot fetch DDO from Aquarius')
711
731
 
712
- datatoken = new Datatoken(consumerAccount)
732
+ datatoken = new Datatoken(consumerAccount, await consumerAccount.getChainId())
713
733
 
714
734
  ```
715
735
  At this point we need to encrypt file(s) using provider
@@ -791,7 +811,7 @@ Here are the steps:
791
811
  ### 10.1 Add key-value pair to data NFT
792
812
  Let's start by using the `setData` method to update the nft key value store with some data
793
813
  ```Typescript
794
- const nft = new Nft(publisherAccount)
814
+ const nft = new Nft(publisherAccount, await publisherAccount.getChainId())
795
815
  const data = 'SomeData'
796
816
  try {
797
817
  await nft.setData(
@@ -183,7 +183,7 @@ const DATASET_DDO: DDO = {
183
183
  '@context': ['https://w3id.org/did/v1'],
184
184
  id: 'id:op:efba17455c127a885ec7830d687a8f6e64f5ba559f8506f8723c1f10f05c049c',
185
185
  version: '4.1.0',
186
- chainId: 5,
186
+ chainId: 8996,
187
187
  nftAddress: '0x0',
188
188
  metadata: {
189
189
  created: '2021-12-20T14:35:20Z',
@@ -219,7 +219,7 @@ const ALGORITHM_DDO: DDO = {
219
219
  '@context': ['https://w3id.org/did/v1'],
220
220
  id: 'did:op:efba17455c127a885ec7830d687a8f6e64f5ba559f8506f8723c1f10f05c049c',
221
221
  version: '4.1.0',
222
- chainId: 5,
222
+ chainId: 8996,
223
223
  nftAddress: '0x0',
224
224
  metadata: {
225
225
  created: '2021-12-20T14:35:20Z',
@@ -293,7 +293,11 @@ async function createAsset(
293
293
  ) {
294
294
  const nft = new Nft(owner, (await owner.provider.getNetwork()).chainId)
295
295
 
296
- const nftFactory = new NftFactory(addresses.ERC721Factory, owner)
296
+ const nftFactory = new NftFactory(
297
+ addresses.ERC721Factory,
298
+ owner,
299
+ await owner.getChainId()
300
+ )
297
301
 
298
302
  const chain = (await owner.provider.getNetwork()).chainId
299
303