@oceanprotocol/lib 5.0.5 → 5.1.0

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 (36) hide show
  1. package/CHANGELOG.md +44 -9
  2. package/CodeExamples.md +8 -4
  3. package/ComputeExamples.md +4 -2
  4. package/dist/lib.cjs +1 -1
  5. package/dist/lib.cjs.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.mjs +1 -1
  9. package/dist/lib.module.mjs.map +1 -1
  10. package/dist/lib.umd.js +1 -1
  11. package/dist/lib.umd.js.map +1 -1
  12. package/dist/types/config/Config.d.ts +0 -8
  13. package/dist/types/contracts/Dispenser.d.ts +1 -1
  14. package/dist/types/contracts/EnterpriseFeeCollector.d.ts +2 -1
  15. package/dist/types/contracts/Escrow.d.ts +12 -9
  16. package/dist/types/contracts/FixedRateExchange.d.ts +0 -1
  17. package/dist/types/contracts/NFT.d.ts +1 -1
  18. package/dist/types/contracts/index.d.ts +0 -6
  19. package/dist/types/services/Aquarius.d.ts +3 -2
  20. package/dist/types/services/Provider.d.ts +5 -3
  21. package/dist/types/utils/Assets.d.ts +2 -1
  22. package/dist/types/utils/TokenUtils.d.ts +2 -1
  23. package/docs/modules.md +0 -6
  24. package/package.json +5 -5
  25. package/dist/types/contracts/df/DfRewards.d.ts +0 -31
  26. package/dist/types/contracts/df/DfStrategyV1.d.ts +0 -21
  27. package/dist/types/contracts/ve/VeAllocate.d.ts +0 -38
  28. package/dist/types/contracts/ve/VeFeeDistributor.d.ts +0 -29
  29. package/dist/types/contracts/ve/VeFeeEstimate.d.ts +0 -14
  30. package/dist/types/contracts/ve/VeOcean.d.ts +0 -68
  31. package/docs/classes/DfRewards.md +0 -345
  32. package/docs/classes/DfStrategyV1.md +0 -313
  33. package/docs/classes/VeAllocate.md +0 -372
  34. package/docs/classes/VeFeeDistributor.md +0 -325
  35. package/docs/classes/VeFeeEstimate.md +0 -281
  36. package/docs/classes/VeOcean.md +0 -513
@@ -1,372 +0,0 @@
1
- [@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / VeAllocate
2
-
3
- # Class: VeAllocate
4
-
5
- Provides an interface for veOcean contract
6
-
7
- ## Hierarchy
8
-
9
- - [`SmartContractWithAddress`](SmartContractWithAddress.md)
10
-
11
- ↳ **`VeAllocate`**
12
-
13
- ## Table of contents
14
-
15
- ### Constructors
16
-
17
- - [constructor](VeAllocate.md#constructor)
18
-
19
- ### Properties
20
-
21
- - [abi](VeAllocate.md#abi)
22
- - [address](VeAllocate.md#address)
23
- - [config](VeAllocate.md#config)
24
- - [contract](VeAllocate.md#contract)
25
- - [signer](VeAllocate.md#signer)
26
-
27
- ### Methods
28
-
29
- - [amountToUnits](VeAllocate.md#amounttounits)
30
- - [getContract](VeAllocate.md#getcontract)
31
- - [getDefaultAbi](VeAllocate.md#getdefaultabi)
32
- - [getFairGasPrice](VeAllocate.md#getfairgasprice)
33
- - [getTotalAllocation](VeAllocate.md#gettotalallocation)
34
- - [getVeAllocation](VeAllocate.md#getveallocation)
35
- - [setAllocation](VeAllocate.md#setallocation)
36
- - [setBatchAllocation](VeAllocate.md#setbatchallocation)
37
- - [unitsToAmount](VeAllocate.md#unitstoamount)
38
-
39
- ## Constructors
40
-
41
- ### constructor
42
-
43
- • **new VeAllocate**(`address`, `signer`, `network?`, `config?`, `abi?`)
44
-
45
- Instantiate the smart contract.
46
-
47
- #### Parameters
48
-
49
- | Name | Type | Description |
50
- | :------ | :------ | :------ |
51
- | `address` | `string` | The address of the contract. |
52
- | `signer` | `Signer` | The signer object. |
53
- | `network?` | `string` \| `number` | Network id or name |
54
- | `config?` | [`Config`](Config.md) | The configuration object. |
55
- | `abi?` | [`AbiItem`](../interfaces/AbiItem.md)[] | ABI array of the smart contract |
56
-
57
- #### Inherited from
58
-
59
- [SmartContractWithAddress](SmartContractWithAddress.md).[constructor](SmartContractWithAddress.md#constructor)
60
-
61
- #### Defined in
62
-
63
- [contracts/SmartContractWithAddress.ts:17](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L17)
64
-
65
- ## Properties
66
-
67
- ### abi
68
-
69
- • **abi**: [`AbiItem`](../interfaces/AbiItem.md)[]
70
-
71
- #### Inherited from
72
-
73
- [SmartContractWithAddress](SmartContractWithAddress.md).[abi](SmartContractWithAddress.md#abi)
74
-
75
- #### Defined in
76
-
77
- [contracts/SmartContract.ts:14](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L14)
78
-
79
- ___
80
-
81
- ### address
82
-
83
- • **address**: `string`
84
-
85
- #### Inherited from
86
-
87
- [SmartContractWithAddress](SmartContractWithAddress.md).[address](SmartContractWithAddress.md#address)
88
-
89
- #### Defined in
90
-
91
- [contracts/SmartContractWithAddress.ts:6](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L6)
92
-
93
- ___
94
-
95
- ### config
96
-
97
- • **config**: [`Config`](Config.md)
98
-
99
- #### Inherited from
100
-
101
- [SmartContractWithAddress](SmartContractWithAddress.md).[config](SmartContractWithAddress.md#config)
102
-
103
- #### Defined in
104
-
105
- [contracts/SmartContract.ts:13](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L13)
106
-
107
- ___
108
-
109
- ### contract
110
-
111
- • **contract**: `Contract`
112
-
113
- #### Inherited from
114
-
115
- [SmartContractWithAddress](SmartContractWithAddress.md).[contract](SmartContractWithAddress.md#contract)
116
-
117
- #### Defined in
118
-
119
- [contracts/SmartContractWithAddress.ts:7](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L7)
120
-
121
- ___
122
-
123
- ### signer
124
-
125
- • **signer**: `Signer`
126
-
127
- #### Inherited from
128
-
129
- [SmartContractWithAddress](SmartContractWithAddress.md).[signer](SmartContractWithAddress.md#signer)
130
-
131
- #### Defined in
132
-
133
- [contracts/SmartContract.ts:12](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L12)
134
-
135
- ## Methods
136
-
137
- ### amountToUnits
138
-
139
- ▸ `Protected` **amountToUnits**(`token`, `amount`, `tokenDecimals?`): `Promise`<`string`\>
140
-
141
- Converts an amount of tokens to units
142
-
143
- #### Parameters
144
-
145
- | Name | Type | Description |
146
- | :------ | :------ | :------ |
147
- | `token` | `string` | The token to convert |
148
- | `amount` | `string` | The amount of tokens to convert |
149
- | `tokenDecimals?` | `number` | The number of decimals of the token |
150
-
151
- #### Returns
152
-
153
- `Promise`<`string`\>
154
-
155
- - The converted amount in units
156
-
157
- #### Inherited from
158
-
159
- [SmartContractWithAddress](SmartContractWithAddress.md).[amountToUnits](SmartContractWithAddress.md#amounttounits)
160
-
161
- #### Defined in
162
-
163
- [contracts/SmartContract.ts:43](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L43)
164
-
165
- ___
166
-
167
- ### getContract
168
-
169
- ▸ `Protected` **getContract**(`address`, `abi?`): `Contract`
170
-
171
- Returns a contract instance for the given address
172
-
173
- #### Parameters
174
-
175
- | Name | Type | Description |
176
- | :------ | :------ | :------ |
177
- | `address` | `string` | The address of the contract |
178
- | `abi?` | [`AbiItem`](../interfaces/AbiItem.md)[] | The ABI of the contract |
179
-
180
- #### Returns
181
-
182
- `Contract`
183
-
184
- - The contract instance
185
-
186
- #### Inherited from
187
-
188
- [SmartContractWithAddress](SmartContractWithAddress.md).[getContract](SmartContractWithAddress.md#getcontract)
189
-
190
- #### Defined in
191
-
192
- [contracts/SmartContract.ts:80](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L80)
193
-
194
- ___
195
-
196
- ### getDefaultAbi
197
-
198
- ▸ **getDefaultAbi**(): [`AbiItem`](../interfaces/AbiItem.md)[]
199
-
200
- #### Returns
201
-
202
- [`AbiItem`](../interfaces/AbiItem.md)[]
203
-
204
- #### Overrides
205
-
206
- [SmartContractWithAddress](SmartContractWithAddress.md).[getDefaultAbi](SmartContractWithAddress.md#getdefaultabi)
207
-
208
- #### Defined in
209
-
210
- [contracts/ve/VeAllocate.ts:9](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeAllocate.ts#L9)
211
-
212
- ___
213
-
214
- ### getFairGasPrice
215
-
216
- ▸ `Protected` **getFairGasPrice**(): `Promise`<`string`\>
217
-
218
- Retruns the gas price
219
-
220
- #### Returns
221
-
222
- `Promise`<`string`\>
223
-
224
- - The fair gas price
225
-
226
- #### Inherited from
227
-
228
- [SmartContractWithAddress](SmartContractWithAddress.md).[getFairGasPrice](SmartContractWithAddress.md#getfairgasprice)
229
-
230
- #### Defined in
231
-
232
- [contracts/SmartContract.ts:70](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L70)
233
-
234
- ___
235
-
236
- ### getTotalAllocation
237
-
238
- ▸ **getTotalAllocation**(`userAddress`): `Promise`<`number`\>
239
-
240
- Get totalAllocation for address
241
-
242
- #### Parameters
243
-
244
- | Name | Type | Description |
245
- | :------ | :------ | :------ |
246
- | `userAddress` | `string` | user address |
247
-
248
- #### Returns
249
-
250
- `Promise`<`number`\>
251
-
252
- #### Defined in
253
-
254
- [contracts/ve/VeAllocate.ts:81](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeAllocate.ts#L81)
255
-
256
- ___
257
-
258
- ### getVeAllocation
259
-
260
- ▸ **getVeAllocation**(`userAddress`, `nft`, `chainId`): `Promise`<`number`\>
261
-
262
- Get getveAllocation for address, nft, chainId
263
-
264
- #### Parameters
265
-
266
- | Name | Type | Description |
267
- | :------ | :------ | :------ |
268
- | `userAddress` | `string` | user address |
269
- | `nft` | `string` | NFT address to allocate to |
270
- | `chainId` | `string` | chainId of NFT |
271
-
272
- #### Returns
273
-
274
- `Promise`<`number`\>
275
-
276
- #### Defined in
277
-
278
- [contracts/ve/VeAllocate.ts:92](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeAllocate.ts#L92)
279
-
280
- ___
281
-
282
- ### setAllocation
283
-
284
- ▸ **setAllocation**<`G`\>(`amount`, `nft`, `chainId`, `estimateGas?`): `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
285
-
286
- set a specific percentage of veOcean to a specific nft
287
- Maximum allocated percentage is 10000, so 1% is specified as 100
288
-
289
- #### Type parameters
290
-
291
- | Name | Type |
292
- | :------ | :------ |
293
- | `G` | extends `boolean` = ``false`` |
294
-
295
- #### Parameters
296
-
297
- | Name | Type | Description |
298
- | :------ | :------ | :------ |
299
- | `amount` | `string` | Percentage used |
300
- | `nft` | `string` | NFT address to allocate to |
301
- | `chainId` | `number` | chainId of NFT |
302
- | `estimateGas?` | `G` | - |
303
-
304
- #### Returns
305
-
306
- `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
307
-
308
- #### Defined in
309
-
310
- [contracts/ve/VeAllocate.ts:21](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeAllocate.ts#L21)
311
-
312
- ___
313
-
314
- ### setBatchAllocation
315
-
316
- ▸ **setBatchAllocation**<`G`\>(`amount`, `nft`, `chainId`, `estimateGas?`): `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
317
-
318
- set specific percentage of veOcean to multiple nfts
319
- Maximum allocated percentage is 10000, so 1% is specified as 100
320
-
321
- #### Type parameters
322
-
323
- | Name | Type |
324
- | :------ | :------ |
325
- | `G` | extends `boolean` = ``false`` |
326
-
327
- #### Parameters
328
-
329
- | Name | Type | Description |
330
- | :------ | :------ | :------ |
331
- | `amount` | `string`[] | Array of percentages used |
332
- | `nft` | `string`[] | Array of NFT addresses |
333
- | `chainId` | `number`[] | Array of chainIds |
334
- | `estimateGas?` | `G` | - |
335
-
336
- #### Returns
337
-
338
- `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
339
-
340
- #### Defined in
341
-
342
- [contracts/ve/VeAllocate.ts:51](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeAllocate.ts#L51)
343
-
344
- ___
345
-
346
- ### unitsToAmount
347
-
348
- ▸ `Protected` **unitsToAmount**(`token`, `amount`, `tokenDecimals?`): `Promise`<`string`\>
349
-
350
- Converts an amount of units to tokens
351
-
352
- #### Parameters
353
-
354
- | Name | Type | Description |
355
- | :------ | :------ | :------ |
356
- | `token` | `string` | The token to convert |
357
- | `amount` | `string` | The amount of units to convert |
358
- | `tokenDecimals?` | `number` | The number of decimals in the token |
359
-
360
- #### Returns
361
-
362
- `Promise`<`string`\>
363
-
364
- - The converted amount in tokens
365
-
366
- #### Inherited from
367
-
368
- [SmartContractWithAddress](SmartContractWithAddress.md).[unitsToAmount](SmartContractWithAddress.md#unitstoamount)
369
-
370
- #### Defined in
371
-
372
- [contracts/SmartContract.ts:58](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L58)
@@ -1,325 +0,0 @@
1
- [@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / VeFeeDistributor
2
-
3
- # Class: VeFeeDistributor
4
-
5
- Provides an interface for veOcean contract
6
-
7
- ## Hierarchy
8
-
9
- - [`SmartContractWithAddress`](SmartContractWithAddress.md)
10
-
11
- ↳ **`VeFeeDistributor`**
12
-
13
- ## Table of contents
14
-
15
- ### Constructors
16
-
17
- - [constructor](VeFeeDistributor.md#constructor)
18
-
19
- ### Properties
20
-
21
- - [abi](VeFeeDistributor.md#abi)
22
- - [address](VeFeeDistributor.md#address)
23
- - [config](VeFeeDistributor.md#config)
24
- - [contract](VeFeeDistributor.md#contract)
25
- - [signer](VeFeeDistributor.md#signer)
26
-
27
- ### Methods
28
-
29
- - [amountToUnits](VeFeeDistributor.md#amounttounits)
30
- - [claim](VeFeeDistributor.md#claim)
31
- - [claimMany](VeFeeDistributor.md#claimmany)
32
- - [getContract](VeFeeDistributor.md#getcontract)
33
- - [getDefaultAbi](VeFeeDistributor.md#getdefaultabi)
34
- - [getFairGasPrice](VeFeeDistributor.md#getfairgasprice)
35
- - [unitsToAmount](VeFeeDistributor.md#unitstoamount)
36
-
37
- ## Constructors
38
-
39
- ### constructor
40
-
41
- • **new VeFeeDistributor**(`address`, `signer`, `network?`, `config?`, `abi?`)
42
-
43
- Instantiate the smart contract.
44
-
45
- #### Parameters
46
-
47
- | Name | Type | Description |
48
- | :------ | :------ | :------ |
49
- | `address` | `string` | The address of the contract. |
50
- | `signer` | `Signer` | The signer object. |
51
- | `network?` | `string` \| `number` | Network id or name |
52
- | `config?` | [`Config`](Config.md) | The configuration object. |
53
- | `abi?` | [`AbiItem`](../interfaces/AbiItem.md)[] | ABI array of the smart contract |
54
-
55
- #### Inherited from
56
-
57
- [SmartContractWithAddress](SmartContractWithAddress.md).[constructor](SmartContractWithAddress.md#constructor)
58
-
59
- #### Defined in
60
-
61
- [contracts/SmartContractWithAddress.ts:17](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L17)
62
-
63
- ## Properties
64
-
65
- ### abi
66
-
67
- • **abi**: [`AbiItem`](../interfaces/AbiItem.md)[]
68
-
69
- #### Inherited from
70
-
71
- [SmartContractWithAddress](SmartContractWithAddress.md).[abi](SmartContractWithAddress.md#abi)
72
-
73
- #### Defined in
74
-
75
- [contracts/SmartContract.ts:14](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L14)
76
-
77
- ___
78
-
79
- ### address
80
-
81
- • **address**: `string`
82
-
83
- #### Inherited from
84
-
85
- [SmartContractWithAddress](SmartContractWithAddress.md).[address](SmartContractWithAddress.md#address)
86
-
87
- #### Defined in
88
-
89
- [contracts/SmartContractWithAddress.ts:6](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L6)
90
-
91
- ___
92
-
93
- ### config
94
-
95
- • **config**: [`Config`](Config.md)
96
-
97
- #### Inherited from
98
-
99
- [SmartContractWithAddress](SmartContractWithAddress.md).[config](SmartContractWithAddress.md#config)
100
-
101
- #### Defined in
102
-
103
- [contracts/SmartContract.ts:13](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L13)
104
-
105
- ___
106
-
107
- ### contract
108
-
109
- • **contract**: `Contract`
110
-
111
- #### Inherited from
112
-
113
- [SmartContractWithAddress](SmartContractWithAddress.md).[contract](SmartContractWithAddress.md#contract)
114
-
115
- #### Defined in
116
-
117
- [contracts/SmartContractWithAddress.ts:7](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContractWithAddress.ts#L7)
118
-
119
- ___
120
-
121
- ### signer
122
-
123
- • **signer**: `Signer`
124
-
125
- #### Inherited from
126
-
127
- [SmartContractWithAddress](SmartContractWithAddress.md).[signer](SmartContractWithAddress.md#signer)
128
-
129
- #### Defined in
130
-
131
- [contracts/SmartContract.ts:12](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L12)
132
-
133
- ## Methods
134
-
135
- ### amountToUnits
136
-
137
- ▸ `Protected` **amountToUnits**(`token`, `amount`, `tokenDecimals?`): `Promise`<`string`\>
138
-
139
- Converts an amount of tokens to units
140
-
141
- #### Parameters
142
-
143
- | Name | Type | Description |
144
- | :------ | :------ | :------ |
145
- | `token` | `string` | The token to convert |
146
- | `amount` | `string` | The amount of tokens to convert |
147
- | `tokenDecimals?` | `number` | The number of decimals of the token |
148
-
149
- #### Returns
150
-
151
- `Promise`<`string`\>
152
-
153
- - The converted amount in units
154
-
155
- #### Inherited from
156
-
157
- [SmartContractWithAddress](SmartContractWithAddress.md).[amountToUnits](SmartContractWithAddress.md#amounttounits)
158
-
159
- #### Defined in
160
-
161
- [contracts/SmartContract.ts:43](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L43)
162
-
163
- ___
164
-
165
- ### claim
166
-
167
- ▸ **claim**<`G`\>(`estimateGas?`): `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
168
-
169
- Claim fees for `userAddress`
170
- Each call to claim look at a maximum of 50 user veOCEAN points.
171
- For accounts with many veOCEAN related actions, this function
172
- may need to be called more than once to claim all available
173
- fees. In the `Claimed` event that fires, if `claim_epoch` is
174
- less than `max_epoch`, the account may claim again
175
-
176
- #### Type parameters
177
-
178
- | Name | Type |
179
- | :------ | :------ |
180
- | `G` | extends `boolean` = ``false`` |
181
-
182
- #### Parameters
183
-
184
- | Name | Type | Description |
185
- | :------ | :------ | :------ |
186
- | `estimateGas?` | `G` | if True, return gas estimate |
187
-
188
- #### Returns
189
-
190
- `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
191
-
192
- #### Defined in
193
-
194
- [contracts/ve/VeFeeDistributor.ts:23](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeFeeDistributor.ts#L23)
195
-
196
- ___
197
-
198
- ### claimMany
199
-
200
- ▸ **claimMany**<`G`\>(`addresses`, `estimateGas?`): `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
201
-
202
- Make multiple fee claims in a single call
203
- Used to claim for many accounts at once, or to make
204
- multiple claims for the same address when that address
205
- has significant veOCEAN history
206
-
207
- #### Type parameters
208
-
209
- | Name | Type |
210
- | :------ | :------ |
211
- | `G` | extends `boolean` = ``false`` |
212
-
213
- #### Parameters
214
-
215
- | Name | Type | Description |
216
- | :------ | :------ | :------ |
217
- | `addresses` | `string`[] | array of addresses to claim |
218
- | `estimateGas?` | `G` | if True, return gas estimate |
219
-
220
- #### Returns
221
-
222
- `Promise`<[`ReceiptOrEstimate`](../modules.md#receiptorestimate)<`G`\>\>
223
-
224
- #### Defined in
225
-
226
- [contracts/ve/VeFeeDistributor.ts:48](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeFeeDistributor.ts#L48)
227
-
228
- ___
229
-
230
- ### getContract
231
-
232
- ▸ `Protected` **getContract**(`address`, `abi?`): `Contract`
233
-
234
- Returns a contract instance for the given address
235
-
236
- #### Parameters
237
-
238
- | Name | Type | Description |
239
- | :------ | :------ | :------ |
240
- | `address` | `string` | The address of the contract |
241
- | `abi?` | [`AbiItem`](../interfaces/AbiItem.md)[] | The ABI of the contract |
242
-
243
- #### Returns
244
-
245
- `Contract`
246
-
247
- - The contract instance
248
-
249
- #### Inherited from
250
-
251
- [SmartContractWithAddress](SmartContractWithAddress.md).[getContract](SmartContractWithAddress.md#getcontract)
252
-
253
- #### Defined in
254
-
255
- [contracts/SmartContract.ts:80](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L80)
256
-
257
- ___
258
-
259
- ### getDefaultAbi
260
-
261
- ▸ **getDefaultAbi**(): [`AbiItem`](../interfaces/AbiItem.md)[]
262
-
263
- #### Returns
264
-
265
- [`AbiItem`](../interfaces/AbiItem.md)[]
266
-
267
- #### Overrides
268
-
269
- [SmartContractWithAddress](SmartContractWithAddress.md).[getDefaultAbi](SmartContractWithAddress.md#getdefaultabi)
270
-
271
- #### Defined in
272
-
273
- [contracts/ve/VeFeeDistributor.ts:9](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/ve/VeFeeDistributor.ts#L9)
274
-
275
- ___
276
-
277
- ### getFairGasPrice
278
-
279
- ▸ `Protected` **getFairGasPrice**(): `Promise`<`string`\>
280
-
281
- Retruns the gas price
282
-
283
- #### Returns
284
-
285
- `Promise`<`string`\>
286
-
287
- - The fair gas price
288
-
289
- #### Inherited from
290
-
291
- [SmartContractWithAddress](SmartContractWithAddress.md).[getFairGasPrice](SmartContractWithAddress.md#getfairgasprice)
292
-
293
- #### Defined in
294
-
295
- [contracts/SmartContract.ts:70](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L70)
296
-
297
- ___
298
-
299
- ### unitsToAmount
300
-
301
- ▸ `Protected` **unitsToAmount**(`token`, `amount`, `tokenDecimals?`): `Promise`<`string`\>
302
-
303
- Converts an amount of units to tokens
304
-
305
- #### Parameters
306
-
307
- | Name | Type | Description |
308
- | :------ | :------ | :------ |
309
- | `token` | `string` | The token to convert |
310
- | `amount` | `string` | The amount of units to convert |
311
- | `tokenDecimals?` | `number` | The number of decimals in the token |
312
-
313
- #### Returns
314
-
315
- `Promise`<`string`\>
316
-
317
- - The converted amount in tokens
318
-
319
- #### Inherited from
320
-
321
- [SmartContractWithAddress](SmartContractWithAddress.md).[unitsToAmount](SmartContractWithAddress.md#unitstoamount)
322
-
323
- #### Defined in
324
-
325
- [contracts/SmartContract.ts:58](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/contracts/SmartContract.ts#L58)