@oceanprotocol/lib 2.0.0-next.3 → 2.0.2

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.
package/CHANGELOG.md CHANGED
@@ -4,9 +4,40 @@ 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
+ #### [v2.0.2](https://github.com/oceanprotocol/ocean.js/compare/v2.0.1...v2.0.2)
8
+
9
+ - rollback microbundle package [`#1611`](https://github.com/oceanprotocol/ocean.js/pull/1611)
10
+
11
+ #### [v2.0.1](https://github.com/oceanprotocol/ocean.js/compare/v2.0.0...v2.0.1)
12
+
13
+ > 12 September 2022
14
+
15
+ - Bump microbundle from 0.14.2 to 0.15.1 [`#1600`](https://github.com/oceanprotocol/ocean.js/pull/1600)
16
+ - Bump @truffle/hdwallet-provider from 2.0.10 to 2.0.14 [`#1609`](https://github.com/oceanprotocol/ocean.js/pull/1609)
17
+ - Bump mock-local-storage from 1.1.21 to 1.1.23 [`#1610`](https://github.com/oceanprotocol/ocean.js/pull/1610)
18
+ - Bump @types/node from 18.0.1 to 18.7.16 [`#1608`](https://github.com/oceanprotocol/ocean.js/pull/1608)
19
+ - Put back missing c2d test flows [`#1604`](https://github.com/oceanprotocol/ocean.js/pull/1604)
20
+ - Feature/add ve fee estimate [`#1606`](https://github.com/oceanprotocol/ocean.js/pull/1606)
21
+ - Bump eslint from 8.19.0 to 8.23.0 [`#1602`](https://github.com/oceanprotocol/ocean.js/pull/1602)
22
+ - Bump @typescript-eslint/eslint-plugin from 5.33.1 to 5.36.2 [`#1601`](https://github.com/oceanprotocol/ocean.js/pull/1601)
23
+ - Bump decimal.js from 10.3.1 to 10.4.0 [`#1598`](https://github.com/oceanprotocol/ocean.js/pull/1598)
24
+ - fixed approve methods [`#1603`](https://github.com/oceanprotocol/ocean.js/pull/1603)
25
+ - debug [`ebe15f9`](https://github.com/oceanprotocol/ocean.js/commit/ebe15f9dcf6d60b863da2552a154e0d180510dff)
26
+ - put back paid env test [`219d4b4`](https://github.com/oceanprotocol/ocean.js/commit/219d4b4a1e1a2bba04cfaa2e26808b0f4a1fa717)
27
+ - update asset timeouts [`9fc8a8e`](https://github.com/oceanprotocol/ocean.js/commit/9fc8a8ebb316d0aefcce6d38f83aeb6f4fc5734d)
28
+
29
+ #### [v2.0.0](https://github.com/oceanprotocol/ocean.js/compare/v2.0.0-next.3...v2.0.0)
30
+
31
+ > 7 September 2022
32
+
33
+ - Release 2.0.0 [`197a75a`](https://github.com/oceanprotocol/ocean.js/commit/197a75a2f95caa44d70e48deb62c482ef855d892)
34
+
7
35
  #### [v2.0.0-next.3](https://github.com/oceanprotocol/ocean.js/compare/v2.0.0-next.2...v2.0.0-next.3)
8
36
 
37
+ > 6 September 2022
38
+
9
39
  - add DataFarming contract support [`#1596`](https://github.com/oceanprotocol/ocean.js/pull/1596)
40
+ - Release 2.0.0-next.3 [`00aaf37`](https://github.com/oceanprotocol/ocean.js/commit/00aaf3797ab66c7bd8e4c5449e200ae6d280e776)
10
41
 
11
42
  #### [v2.0.0-next.2](https://github.com/oceanprotocol/ocean.js/compare/v2.0.0-next.1...v2.0.0-next.2)
12
43
 
@@ -123,7 +154,21 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
123
154
  - Bump typedoc from 0.22.15 to 0.22.17 [`#1514`](https://github.com/oceanprotocol/ocean.js/pull/1514)
124
155
  - Release 1.1.3 [`7772e93`](https://github.com/oceanprotocol/ocean.js/commit/7772e9387ef9d63f98ea80cfd4eefbea963dd0ad)
125
156
 
126
- #### [v1.1.2](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0...v1.1.2)
157
+ #### [v1.1.2](https://github.com/oceanprotocol/ocean.js/compare/v1.1.1...v1.1.2)
158
+
159
+ > 15 June 2022
160
+
161
+ - Release 1.1.2 [`85bf271`](https://github.com/oceanprotocol/ocean.js/commit/85bf2716e26d8691aeb9d5504e563d557419dc2e)
162
+ - manual bump fix [`5674a54`](https://github.com/oceanprotocol/ocean.js/commit/5674a547d1d367ce88b3595f0be8ebbf12274266)
163
+
164
+ #### [v1.1.1](https://github.com/oceanprotocol/ocean.js/compare/v1.1.0...v1.1.1)
165
+
166
+ > 15 June 2022
167
+
168
+ - Release 1.1.1 [`ea48e01`](https://github.com/oceanprotocol/ocean.js/commit/ea48e015ac8299f71d57a929f8f30c5d1a8446e7)
169
+ - manual bump fix [`a362410`](https://github.com/oceanprotocol/ocean.js/commit/a36241004b1d9578ec5c02d9d6e64d9750c53a7b)
170
+
171
+ #### [v1.1.0](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0...v1.1.0)
127
172
 
128
173
  > 15 June 2022
129
174
 
@@ -131,9 +176,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
131
176
  - Bump @types/node from 17.0.35 to 17.0.44 [`#1513`](https://github.com/oceanprotocol/ocean.js/pull/1513)
132
177
  - Bump eslint-config-oceanprotocol from 1.5.0 to 2.0.1 [`#1466`](https://github.com/oceanprotocol/ocean.js/pull/1466)
133
178
  - update to new schema & compute fixes [`#1510`](https://github.com/oceanprotocol/ocean.js/pull/1510)
134
- - Release 1.1.2 [`85bf271`](https://github.com/oceanprotocol/ocean.js/commit/85bf2716e26d8691aeb9d5504e563d557419dc2e)
135
- - manual bump fix [`5674a54`](https://github.com/oceanprotocol/ocean.js/commit/5674a547d1d367ce88b3595f0be8ebbf12274266)
136
- - manual bump fix [`a362410`](https://github.com/oceanprotocol/ocean.js/commit/a36241004b1d9578ec5c02d9d6e64d9750c53a7b)
179
+ - Release 1.1.0 [`112c27e`](https://github.com/oceanprotocol/ocean.js/commit/112c27edab58ef0681ea3e87fb09978411924753)
137
180
 
138
181
  #### [v1.0.0](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0-next.45...v1.0.0)
139
182
 
package/CodeExamples.md CHANGED
@@ -85,6 +85,7 @@ Start by importing all of the necessary dependencies
85
85
 
86
86
  ```Typescript
87
87
 
88
+ import { AbiItem } from 'web3-utils'
88
89
  import { SHA256 } from 'crypto-js'
89
90
  import {
90
91
  approve,
@@ -106,7 +107,9 @@ import {
106
107
  ProviderFees,
107
108
  ProviderInstance,
108
109
  transfer,
109
- ZERO_ADDRESS
110
+ ZERO_ADDRESS,
111
+ calculateEstimatedGas,
112
+ sendTx
110
113
  } from '../../src'
111
114
  import { getAddresses, getTestConfig, web3 } from '../config'
112
115
  ```
@@ -202,7 +205,13 @@ As we go along it's a good idea to console log the values so that you check they
202
205
  ```
203
206
 
204
207
  ## 5. Initialize accounts and deploy contracts
205
- ### 5.1 Initialize accounts
208
+ ### 5.1 Next, lets get the address of the deployed contracts
209
+ ```Typescript
210
+ addresses = getAddresses()
211
+
212
+ ```
213
+
214
+ ### 5.2 Initialize accounts
206
215
  ```Typescript
207
216
  const accounts = await web3.eth.getAccounts()
208
217
  publisherAccount = accounts[0]
@@ -214,6 +223,39 @@ Again, lets console log the values so that we can check that they have been save
214
223
  console.log(`Publisher account address: ${publisherAccount}`)
215
224
  console.log(`Consumer account address: ${consumerAccount}`)
216
225
  console.log(`Staker account address: ${stakerAccount}`)
226
+ <!--
227
+ // mint ocean to publisherAccount
228
+ const minAbi = [
229
+ {
230
+ constant: false,
231
+ inputs: [
232
+ { name: 'to', type: 'address' },
233
+ { name: 'value', type: 'uint256' }
234
+ ],
235
+ name: 'mint',
236
+ outputs: [{ name: '', type: 'bool' }],
237
+ payable: false,
238
+ stateMutability: 'nonpayable',
239
+ type: 'function'
240
+ }
241
+ ] as AbiItem[]
242
+ const tokenContract = new web3.eth.Contract(minAbi, addresses.Ocean)
243
+ const estGas = await calculateEstimatedGas(
244
+ publisherAccount,
245
+ tokenContract.methods.mint,
246
+ publisherAccount,
247
+ web3.utils.toWei('1000')
248
+ )
249
+ await sendTx(
250
+ publisherAccount,
251
+ estGas,
252
+ web3,
253
+ 1,
254
+ tokenContract.methods.mint,
255
+ publisherAccount,
256
+ web3.utils.toWei('1000')
257
+ )
258
+ -->
217
259
 
218
260
  ```
219
261