@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.
- package/CHANGELOG.md +81 -8
- package/CodeExamples.md +31 -11
- package/ComputeExamples.md +7 -3
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.js +1 -1
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/types/@types/Asset.d.ts +148 -0
- package/dist/types/@types/Compute.d.ts +71 -0
- package/dist/types/@types/Contracts.d.ts +26 -0
- package/dist/types/@types/DDO/ConsumerParameter.d.ts +37 -0
- package/dist/types/@types/DDO/Credentials.d.ts +8 -0
- package/dist/types/@types/DDO/DDO.d.ts +55 -0
- package/dist/types/@types/DDO/Event.d.ts +27 -0
- package/dist/types/@types/DDO/Metadata.d.ts +141 -0
- package/dist/types/@types/DDO/Service.d.ts +106 -0
- package/dist/types/@types/Datatoken.d.ts +42 -0
- package/dist/types/@types/Dispenser.d.ts +16 -0
- package/dist/types/@types/DownloadResponse.d.ts +4 -0
- package/dist/types/@types/File.d.ts +89 -0
- package/dist/types/@types/FileInfo.d.ts +43 -0
- package/dist/types/@types/FixedPrice.d.ts +51 -0
- package/dist/types/@types/NFT.d.ts +18 -0
- package/dist/types/@types/NFTFactory.d.ts +20 -0
- package/dist/types/@types/Provider.d.ts +33 -0
- package/dist/types/@types/ReturnTypes.d.ts +3 -0
- package/dist/types/@types/Router.d.ts +59 -0
- package/dist/types/@types/index.d.ts +20 -0
- package/dist/types/config/Config.d.ts +162 -0
- package/dist/types/config/ConfigHelper.d.ts +13 -0
- package/dist/types/config/index.d.ts +2 -0
- package/dist/types/contracts/AccessList.d.ts +85 -0
- package/dist/types/contracts/AccessListFactory.d.ts +56 -0
- package/dist/types/contracts/Datatoken.d.ts +278 -0
- package/dist/types/contracts/Datatoken4.d.ts +72 -0
- package/dist/types/contracts/Dispenser.d.ts +73 -0
- package/dist/types/contracts/FixedRateExchange.d.ts +209 -0
- package/dist/types/contracts/NFT.d.ts +227 -0
- package/dist/types/contracts/NFTFactory.d.ts +165 -0
- package/dist/types/contracts/Router.d.ts +107 -0
- package/dist/types/contracts/SmartContract.d.ts +46 -0
- package/dist/types/contracts/SmartContractWithAddress.d.ts +17 -0
- package/dist/types/contracts/df/DfRewards.d.ts +31 -0
- package/dist/types/contracts/df/DfStrategyV1.d.ts +21 -0
- package/dist/types/contracts/index.d.ts +20 -0
- package/dist/types/contracts/ve/VeAllocate.d.ts +38 -0
- package/dist/types/contracts/ve/VeFeeDistributor.d.ts +29 -0
- package/dist/types/contracts/ve/VeFeeEstimate.d.ts +14 -0
- package/dist/types/contracts/ve/VeOcean.d.ts +68 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/services/Aquarius.d.ts +53 -0
- package/dist/types/services/Provider.d.ts +197 -0
- package/dist/types/services/index.d.ts +2 -0
- package/dist/types/utils/Assets.d.ts +56 -0
- package/dist/types/utils/Constants.d.ts +4 -0
- package/dist/types/utils/ContractUtils.d.ts +46 -0
- package/dist/types/utils/DatatokenName.d.ts +14 -0
- package/dist/types/utils/DdoHelpers.d.ts +13 -0
- package/dist/types/utils/FetchHelper.d.ts +14 -0
- package/dist/types/utils/General.d.ts +5 -0
- package/dist/types/utils/Logger.d.ts +19 -0
- package/dist/types/utils/OrderUtils.d.ts +20 -0
- package/dist/types/utils/ProviderErrors.d.ts +1 -0
- package/dist/types/utils/SignatureUtils.d.ts +12 -0
- package/dist/types/utils/TokenUtils.d.ts +70 -0
- package/dist/types/utils/index.d.ts +13 -0
- package/dist/types/utils/minAbi.d.ts +38 -0
- package/package.json +2 -2
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { Signer } from 'ethers';
|
|
2
|
+
import { AbiItem, ConsumeMarketFee, FreOrderParams, FreCreationParams, ProviderFees, PublishingMarketFee, DispenserParams, OrderParams, DatatokenRoles, ReceiptOrEstimate } from '../@types';
|
|
3
|
+
import { Nft } from './NFT';
|
|
4
|
+
import { Config } from '../config';
|
|
5
|
+
import { SmartContract } from './SmartContract';
|
|
6
|
+
export declare class Datatoken extends SmartContract {
|
|
7
|
+
abiEnterprise: AbiItem[];
|
|
8
|
+
nft: Nft;
|
|
9
|
+
getDefaultAbi(): AbiItem[];
|
|
10
|
+
/**
|
|
11
|
+
* Instantiate Datatoken class
|
|
12
|
+
* @param {Signer} signer The signer object.
|
|
13
|
+
* @param {string | number} [network] Network id or name
|
|
14
|
+
* @param {Config} [config] The configuration object.
|
|
15
|
+
* @param {AbiItem[]} [abi] ABI array of the smart contract
|
|
16
|
+
* @param {AbiItem[]} abiEnterprise Enterprise ABI array of the smart contract
|
|
17
|
+
*/
|
|
18
|
+
constructor(signer: Signer, network?: string | number, config?: Config, abi?: AbiItem[], abiEnterprise?: AbiItem[]);
|
|
19
|
+
/**
|
|
20
|
+
* Approves a spender to spend a certain amount of datatokens.
|
|
21
|
+
* @param {String} dtAddress Datatoken address
|
|
22
|
+
* @param {String} spender Spender address
|
|
23
|
+
* @param {string} amount Number of datatokens, as number. Will be converted to wei
|
|
24
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
25
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
26
|
+
*/
|
|
27
|
+
approve<G extends boolean = false>(dtAddress: string, spender: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
28
|
+
/**
|
|
29
|
+
* Creates a new FixedRateExchange setup.
|
|
30
|
+
* @param {String} dtAddress Datatoken address
|
|
31
|
+
* @param {String} address Caller address
|
|
32
|
+
* @param {FixedRateParams} fixedRateParams The parameters required to create a fixed-rate exchange contract.
|
|
33
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
34
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
35
|
+
*/
|
|
36
|
+
createFixedRate<G extends boolean = false>(dtAddress: string, address: string, fixedRateParams: FreCreationParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates a new Dispenser
|
|
39
|
+
* @param {String} dtAddress Datatoken address
|
|
40
|
+
* @param {String} address Caller address
|
|
41
|
+
* @param {String} dispenserAddress Dispenser contract address
|
|
42
|
+
* @param {DispenserParams} dispenserParams The parameters required to create a dispenser contract.
|
|
43
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
44
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
45
|
+
*/
|
|
46
|
+
createDispenser<G extends boolean = false>(dtAddress: string, address: string, dispenserAddress: string, dispenserParams: DispenserParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
47
|
+
/**
|
|
48
|
+
* Mints datatokens
|
|
49
|
+
* @param {String} dtAddress Datatoken address
|
|
50
|
+
* @param {String} address Minter address
|
|
51
|
+
* @param {String} amount Number of datatokens, as number. Will be converted to wei
|
|
52
|
+
* @param {String} toAddress only if toAddress is different from the minter
|
|
53
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
54
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
55
|
+
*/
|
|
56
|
+
mint<G extends boolean = false>(dtAddress: string, address: string, amount: string, toAddress?: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
57
|
+
/**
|
|
58
|
+
* Add Minter for an ERC20 Datatoken
|
|
59
|
+
* only DatatokenDeployer can succeed
|
|
60
|
+
* @param {String} dtAddress Datatoken address
|
|
61
|
+
* @param {String} address caller address
|
|
62
|
+
* @param {String} minter address which is going to be a Minter
|
|
63
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
64
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
65
|
+
*/
|
|
66
|
+
addMinter<G extends boolean = false>(dtAddress: string, address: string, minter: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
67
|
+
/**
|
|
68
|
+
* Revoke Minter permission for an ERC20 Datatoken
|
|
69
|
+
* only DatatokenDeployer can succeed
|
|
70
|
+
* @param {String} dtAddress Datatoken address
|
|
71
|
+
* @param {String} address caller address
|
|
72
|
+
* @param {String} minter address which will have removed the Minter permission
|
|
73
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
74
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
75
|
+
*/
|
|
76
|
+
removeMinter<G extends boolean = false>(dtAddress: string, address: string, minter: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
77
|
+
/**
|
|
78
|
+
* Adds a payment manager on a datatoken to a desired address.(can set who's going to collect fee when consuming orders)
|
|
79
|
+
* only DatatokenDeployer can succeed
|
|
80
|
+
* @param {String} dtAddress Datatoken address
|
|
81
|
+
* @param {String} address Caller address
|
|
82
|
+
* @param {String} paymentManager The address of the payment manager
|
|
83
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
84
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
85
|
+
*/
|
|
86
|
+
addPaymentManager<G extends boolean = false>(dtAddress: string, address: string, paymentManager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
87
|
+
/**
|
|
88
|
+
* Revoke paymentManager permission for an ERC20 Datatoken
|
|
89
|
+
* only DatatokenDeployer can succeed
|
|
90
|
+
* @param {String} dtAddress Datatoken address
|
|
91
|
+
* @param {String} address User address
|
|
92
|
+
* @param {String} paymentManager User which will be removed from paymentManager permission
|
|
93
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
94
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
95
|
+
*/
|
|
96
|
+
removePaymentManager<G extends boolean = false>(dtAddress: string, address: string, paymentManager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
97
|
+
/**
|
|
98
|
+
* This function allows to set a new PaymentCollector (receives DT when consuming)
|
|
99
|
+
* If not set the paymentCollector is the NFT Owner
|
|
100
|
+
* only NFT owner can call
|
|
101
|
+
* @param dtAddress Datatoken address
|
|
102
|
+
* @param address Caller address
|
|
103
|
+
* @param paymentCollector User to be set as new payment collector
|
|
104
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
105
|
+
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
106
|
+
*/
|
|
107
|
+
setPaymentCollector<G extends boolean = false>(dtAddress: string, address: string, paymentCollector: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
108
|
+
/**
|
|
109
|
+
* getPaymentCollector - It returns the current paymentCollector
|
|
110
|
+
* @param dtAddress datatoken address
|
|
111
|
+
* @return {Promise<string>}
|
|
112
|
+
*/
|
|
113
|
+
getPaymentCollector(dtAddress: string): Promise<string>;
|
|
114
|
+
/**
|
|
115
|
+
* Transfer tokens(as number) from address to toAddress
|
|
116
|
+
* @param {String} dtAddress Datatoken address
|
|
117
|
+
* @param {String} toAddress Receiver address
|
|
118
|
+
* @param {String} amount Number of datatokens, as number. Will be converted to wei.
|
|
119
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
120
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
121
|
+
*/
|
|
122
|
+
transfer<G extends boolean = false>(dtAddress: string, toAddress: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
123
|
+
/**
|
|
124
|
+
* Transfer in wei from address to toAddress
|
|
125
|
+
* @param {String} dtAddress Datatoken address
|
|
126
|
+
* @param {String} toAddress Receiver address
|
|
127
|
+
* @param {String} amount Number of datatokens (number) expressed as wei
|
|
128
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
129
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
130
|
+
*/
|
|
131
|
+
transferWei<G extends boolean = false>(dtAddress: string, toAddress: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
132
|
+
/**
|
|
133
|
+
* Start Order: called by payer or consumer prior ordering a service consume on a marketplace.
|
|
134
|
+
* @param {String} dtAddress Datatoken address
|
|
135
|
+
* @param {String} consumer Consumer Address
|
|
136
|
+
* @param {Number} serviceIndex Service index in the metadata
|
|
137
|
+
* @param {providerFees} providerFees provider fees
|
|
138
|
+
* @param {consumeMarketFee} ConsumeMarketFee consume market fees
|
|
139
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
140
|
+
* @return {Promise<ReceiptOrEstimate>} string
|
|
141
|
+
*/
|
|
142
|
+
startOrder<G extends boolean = false>(dtAddress: string, consumer: string, serviceIndex: number, providerFees: ProviderFees, consumeMarketFee?: ConsumeMarketFee, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
143
|
+
/**
|
|
144
|
+
* Reuse Order: called by payer or consumer having a valid order, but with expired provider access.
|
|
145
|
+
* Pays the provider fee again, but it will not require a new datatoken payment
|
|
146
|
+
* Requires previous approval of provider fee.
|
|
147
|
+
* @param {String} dtAddress Datatoken address
|
|
148
|
+
* @param {String} orderTxId previous valid order
|
|
149
|
+
* @param {providerFees} providerFees provider fees
|
|
150
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
151
|
+
* @return {Promise<ReceiptOrEstimate>} string
|
|
152
|
+
*/
|
|
153
|
+
reuseOrder<G extends boolean = false>(dtAddress: string, orderTxId: string, providerFees: ProviderFees, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
154
|
+
/**
|
|
155
|
+
* Buys 1 DT from the FRE and then startsOrder, while burning that DT
|
|
156
|
+
* @param {String} dtAddress Datatoken address
|
|
157
|
+
* @param {OrderParams} orderParams The parameters required to place an order.
|
|
158
|
+
* @param {FreParams} freParams The parameters required to buy from a fixed-rate exchange.
|
|
159
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
160
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
161
|
+
*/
|
|
162
|
+
buyFromFreAndOrder<G extends boolean = false>(dtAddress: string, orderParams: OrderParams, freParams: FreOrderParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
163
|
+
/**
|
|
164
|
+
* Gets 1 DT from dispenser and then startsOrder, while burning that DT
|
|
165
|
+
* @param {String} dtAddress Datatoken address
|
|
166
|
+
* @param {OrderParams} orderParams - The parameters required to place an order.
|
|
167
|
+
* @param {String} dispenserContract dispenser address
|
|
168
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
169
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
170
|
+
*/
|
|
171
|
+
buyFromDispenserAndOrder<G extends boolean = false>(dtAddress: string, orderParams: OrderParams, dispenserContract: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
172
|
+
/** setData
|
|
173
|
+
* This function allows to store data with a preset key (keccak256(dtAddress)) into NFT 725 Store
|
|
174
|
+
* only DatatokenDeployer can succeed
|
|
175
|
+
* @param {String} dtAddress Datatoken address
|
|
176
|
+
* @param {String} address User address
|
|
177
|
+
* @param {String} value Data to be stored into 725Y standard
|
|
178
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
179
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
180
|
+
*/
|
|
181
|
+
setData<G extends boolean = false>(dtAddress: string, address: string, value: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
182
|
+
/**
|
|
183
|
+
* Clean Datatoken level Permissions (minters, paymentManager and reset the paymentCollector) for an ERC20 Datatoken
|
|
184
|
+
* Only NFT Owner (at 721 level) can call it.
|
|
185
|
+
* @param {string} dtAddress Datatoken address where we want to clean permissions
|
|
186
|
+
* @param {string} address User adress
|
|
187
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
188
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
189
|
+
*/
|
|
190
|
+
cleanPermissions<G extends boolean = false>(dtAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
191
|
+
/**
|
|
192
|
+
* Returns ERC20 Datatoken user's permissions for a datatoken
|
|
193
|
+
* @param {String} dtAddress Datatoken adress
|
|
194
|
+
* @param {String} address user adress
|
|
195
|
+
* @return {Promise<DatatokenRoles>}
|
|
196
|
+
*/
|
|
197
|
+
getPermissions(dtAddress: string, address: string): Promise<DatatokenRoles>;
|
|
198
|
+
/**
|
|
199
|
+
* Returns the Datatoken cap
|
|
200
|
+
* @param {String} dtAddress Datatoken adress
|
|
201
|
+
* @return {Promise<string>}
|
|
202
|
+
*/
|
|
203
|
+
getCap(dtAddress: string): Promise<string>;
|
|
204
|
+
/**
|
|
205
|
+
* It returns the token decimals, how many supported decimal points
|
|
206
|
+
* @param {String} dtAddress Datatoken adress
|
|
207
|
+
* @return {Promise<number>}
|
|
208
|
+
*/
|
|
209
|
+
getDecimals(dtAddress: string): Promise<number>;
|
|
210
|
+
/**
|
|
211
|
+
* It returns the token template index.
|
|
212
|
+
* @param {String} dtAddress Datatoken adress
|
|
213
|
+
* @return {Promise<number>}
|
|
214
|
+
*/
|
|
215
|
+
getId(dtAddress: string): Promise<number>;
|
|
216
|
+
/**
|
|
217
|
+
* It returns the token symbol
|
|
218
|
+
* @param {String} dtAddress Datatoken adress
|
|
219
|
+
* @return {Promise<number>}
|
|
220
|
+
*/
|
|
221
|
+
getSymbol(dtAddress: string): Promise<string>;
|
|
222
|
+
/**
|
|
223
|
+
* It returns the name of the token
|
|
224
|
+
* @param {String} dtAddress Datatoken adress
|
|
225
|
+
* @return {Promise<number>}
|
|
226
|
+
*/
|
|
227
|
+
getName(dtAddress: string): Promise<string>;
|
|
228
|
+
/**
|
|
229
|
+
* It returns the token decimals, how many supported decimal points
|
|
230
|
+
* @param {String} dtAddress Datatoken adress
|
|
231
|
+
* @return {Promise<number>}
|
|
232
|
+
*/
|
|
233
|
+
getNFTAddress(dtAddress: string): Promise<string>;
|
|
234
|
+
/**
|
|
235
|
+
* It returns the list of fixedRateExchanges created for this datatoken.
|
|
236
|
+
* @param {String} dtAddress Datatoken adress
|
|
237
|
+
* @return {Promise<number>}
|
|
238
|
+
*/
|
|
239
|
+
getFixedRates(dtAddress: string): Promise<any[]>;
|
|
240
|
+
/**
|
|
241
|
+
* It returns the list of dispensers created for this datatoken.
|
|
242
|
+
* @param {String} dtAddress Datatoken adress
|
|
243
|
+
* @return {Promise<number>}
|
|
244
|
+
*/
|
|
245
|
+
getDispensers(dtAddress: string): Promise<any[]>;
|
|
246
|
+
/**
|
|
247
|
+
* Returns true if address has deployERC20 role
|
|
248
|
+
* @param {String} dtAddress Datatoken adress
|
|
249
|
+
* @param {String} dtAddress Datatoken adress
|
|
250
|
+
* @return {Promise<boolean>}
|
|
251
|
+
*/
|
|
252
|
+
isDatatokenDeployer(dtAddress: string, address: string): Promise<boolean>;
|
|
253
|
+
/**
|
|
254
|
+
* Get Address Balance for datatoken
|
|
255
|
+
* @param {String} dtAddress Datatoken adress
|
|
256
|
+
* @param {String} address user adress
|
|
257
|
+
* @return {Promise<String>} balance Number of datatokens. Will be converted from wei
|
|
258
|
+
*/
|
|
259
|
+
balance(datatokenAddress: string, address: string): Promise<string>;
|
|
260
|
+
/**
|
|
261
|
+
* Allows to set the fee required by the publisherMarket
|
|
262
|
+
* only publishMarketFeeAddress can call it
|
|
263
|
+
* @param {string} datatokenAddress Datatoken adress
|
|
264
|
+
* @param {string} publishMarketFeeAddress new publish Market Fee Address
|
|
265
|
+
* @param {string} publishMarketFeeToken new publish Market Fee Token
|
|
266
|
+
* @param {string} publishMarketFeeAmount new fee amount
|
|
267
|
+
* @param {String} address user adress
|
|
268
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
269
|
+
*/
|
|
270
|
+
setPublishingMarketFee<G extends boolean = false>(datatokenAddress: string, publishMarketFeeAddress: string, publishMarketFeeToken: string, publishMarketFeeAmount: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
271
|
+
/**
|
|
272
|
+
* Returns the current fee set by the publishing market
|
|
273
|
+
* @param {String} datatokenAddress Datatoken adress
|
|
274
|
+
* @return {Promise<PublishingMarketFee>} Current fee set by the publishing market
|
|
275
|
+
*/
|
|
276
|
+
getPublishingMarketFee(datatokenAddress: string): Promise<PublishingMarketFee>;
|
|
277
|
+
private getFreOrderParams;
|
|
278
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Datatoken } from './Datatoken';
|
|
2
|
+
import { Bytes, Signer } from 'ethers';
|
|
3
|
+
import { AbiItem, ReceiptOrEstimate } from '../@types';
|
|
4
|
+
import { AccessListContract } from './AccessList';
|
|
5
|
+
import { Config } from '../config';
|
|
6
|
+
export declare class Datatoken4 extends Datatoken {
|
|
7
|
+
accessList: AccessListContract;
|
|
8
|
+
fileObject: Bytes;
|
|
9
|
+
getDefaultAbi(): AbiItem[];
|
|
10
|
+
/**
|
|
11
|
+
* Instantiate Datatoken class
|
|
12
|
+
* @param {Signer} signer The signer object.
|
|
13
|
+
* @param {string | number} [network] Network id or name
|
|
14
|
+
* @param {Config} [config] The configuration object.
|
|
15
|
+
* @param {AbiItem[]} [abi] ABI array of the smart contract
|
|
16
|
+
*/
|
|
17
|
+
constructor(signer: Signer, fileObject: Bytes, network?: string | number, config?: Config, abi?: AbiItem[]);
|
|
18
|
+
setFileObj(fileObj: Bytes): void;
|
|
19
|
+
/**
|
|
20
|
+
* getAllowListContract - It returns the current allowList contract address
|
|
21
|
+
* @param dtAddress datatoken address
|
|
22
|
+
* @return {Promise<string>}
|
|
23
|
+
*/
|
|
24
|
+
getAllowlistContract(dtAddress: string): Promise<string>;
|
|
25
|
+
/**
|
|
26
|
+
* getDenyListContract - It returns the current denyList contract address
|
|
27
|
+
* @param dtAddress datatoken address
|
|
28
|
+
* @return {Promise<string>}
|
|
29
|
+
*/
|
|
30
|
+
getDenylistContract(dtAddress: string): Promise<string>;
|
|
31
|
+
/** setAllowListContract
|
|
32
|
+
* This function allows to set another address for allowListContract, only by datatoken deployer
|
|
33
|
+
* only DatatokenDeployer can succeed
|
|
34
|
+
* @param {String} dtAddress Datatoken address
|
|
35
|
+
* @param {String} address Contract address
|
|
36
|
+
* @param {String} consumer User address
|
|
37
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
38
|
+
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
39
|
+
*/
|
|
40
|
+
setAllowListContract<G extends boolean = false>(dtAddress: string, address: string, consumer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
41
|
+
/** setDenyListContract
|
|
42
|
+
* This function allows to set another address for allowListContract, only by datatoken deployer
|
|
43
|
+
* only DatatokenDeployer can succeed
|
|
44
|
+
* @param {String} dtAddress Datatoken address
|
|
45
|
+
* @param {String} address Contract address
|
|
46
|
+
* @param {String} consumer User address
|
|
47
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
48
|
+
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
49
|
+
*/
|
|
50
|
+
setDenyListContract<G extends boolean = false>(dtAddress: string, address: string, consumer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
51
|
+
/** setFileObject
|
|
52
|
+
* This function allows to set file object in ecnrypted format, only by datatoken deployer
|
|
53
|
+
* only DatatokenDeployer can succeed
|
|
54
|
+
* @param {String} dtAddress Datatoken address
|
|
55
|
+
* @param {String} address User address
|
|
56
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
57
|
+
* @return {Promise<ReceiptOrEstimate>} returns the transaction receipt or the estimateGas value
|
|
58
|
+
*/
|
|
59
|
+
setFileObject<G extends boolean = false>(dtAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
60
|
+
/**
|
|
61
|
+
* getFileObject - It returns the consumer's file object encrypted format.
|
|
62
|
+
* @param {String} dtAddress datatoken address
|
|
63
|
+
* @param {Number} serviceIndex - service index
|
|
64
|
+
* @param {String} providerAddress
|
|
65
|
+
* @param {Bytes} providerSignature
|
|
66
|
+
* @param {Bytes} consumerData
|
|
67
|
+
* @param {Bytes} consumerSignature
|
|
68
|
+
* @param {String} consumerAddress
|
|
69
|
+
* @return {Promise<Bytes>} returns file object
|
|
70
|
+
*/
|
|
71
|
+
getFileObject(dtAddress: string, serviceIndex: number, providerAddress: string, providerSignature: Bytes, consumerData: Bytes, consumerSignature: Bytes, consumerAddress: string): Promise<Bytes>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Datatoken } from './Datatoken';
|
|
2
|
+
import { SmartContractWithAddress } from './SmartContractWithAddress';
|
|
3
|
+
import { DispenserToken, ReceiptOrEstimate, AbiItem } from '../@types';
|
|
4
|
+
export declare class Dispenser extends SmartContractWithAddress {
|
|
5
|
+
getDefaultAbi(): AbiItem[];
|
|
6
|
+
/**
|
|
7
|
+
* Get information about a datatoken dispenser
|
|
8
|
+
* @param {String} dtAddress
|
|
9
|
+
* @return {Promise<DispenserToken>}
|
|
10
|
+
*/
|
|
11
|
+
status(dtAdress: string): Promise<DispenserToken>;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a new Dispenser
|
|
14
|
+
* @param {String} dtAddress Datatoken address
|
|
15
|
+
* @param {String} address Owner address
|
|
16
|
+
* @param {String} maxTokens max tokens to dispense
|
|
17
|
+
* @param {String} maxBalance max balance of requester
|
|
18
|
+
* @param {String} allowedSwapper only account that can ask tokens. set address(0) if not required
|
|
19
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
20
|
+
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
21
|
+
*/
|
|
22
|
+
create<G extends boolean = false>(dtAddress: string, address: string, maxTokens: string, maxBalance: string, allowedSwapper: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
23
|
+
/**
|
|
24
|
+
* Activates a dispener.
|
|
25
|
+
* @param {String} dtAddress refers to datatoken address.
|
|
26
|
+
* @param {Number} maxTokens max amount of tokens to dispense
|
|
27
|
+
* @param {Number} maxBalance max balance of user. If user balance is >, then dispense will be rejected
|
|
28
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
29
|
+
* @return {Promise<ReceiptOrEstimate>} TransactionReceipt
|
|
30
|
+
*/
|
|
31
|
+
activate<G extends boolean = false>(dtAddress: string, maxTokens: string, maxBalance: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
32
|
+
/**
|
|
33
|
+
* Deactivate an existing dispenser.
|
|
34
|
+
* @param {String} dtAddress refers to datatoken address.
|
|
35
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
36
|
+
* @return {Promise<ReceiptOrEstimate>} TransactionReceipt
|
|
37
|
+
*/
|
|
38
|
+
deactivate<G extends boolean = false>(dtAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
39
|
+
/**
|
|
40
|
+
* Sets a new allowed swapper.
|
|
41
|
+
* @param {String} dtAddress Datatoken address.
|
|
42
|
+
* @param {String} newAllowedSwapper The address of the new allowed swapper.
|
|
43
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
44
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
45
|
+
*/
|
|
46
|
+
setAllowedSwapper<G extends boolean = false>(dtAddress: string, newAllowedSwapper: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
47
|
+
/**
|
|
48
|
+
* Dispense datatokens to caller.
|
|
49
|
+
* The dispenser must be active, hold enough datatokens (or be able to mint more)
|
|
50
|
+
* and respect maxTokens/maxBalance requirements
|
|
51
|
+
* @param {String} dtAddress Datatoken address.
|
|
52
|
+
* @param {String} amount Amount of datatokens required.
|
|
53
|
+
* @param {String} destination address of tokens receiver
|
|
54
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
55
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
56
|
+
*/
|
|
57
|
+
dispense<G extends boolean = false>(dtAddress: string, amount: string, destination: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
58
|
+
/**
|
|
59
|
+
* Withdraw all tokens from the dispenser
|
|
60
|
+
* @param {String} dtAddress Datatoken address.
|
|
61
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
62
|
+
* @return {Promise<ReceiptOrEstimate>}
|
|
63
|
+
*/
|
|
64
|
+
ownerWithdraw<G extends boolean = false>(dtAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
65
|
+
/**
|
|
66
|
+
* Check if tokens can be dispensed
|
|
67
|
+
* @param {String} dtAddress Datatoken address
|
|
68
|
+
* @param {String} address User address that will receive datatokens
|
|
69
|
+
* @param {String} amount amount of datatokens required.
|
|
70
|
+
* @return {Promise<Boolean>}
|
|
71
|
+
*/
|
|
72
|
+
isDispensable(dtAddress: string, datatoken: Datatoken, address: string, amount?: string): Promise<Boolean>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import { PriceAndFees, FeesInfo, FixedPriceExchange, ReceiptOrEstimate, AbiItem } from '../@types';
|
|
2
|
+
import { SmartContractWithAddress } from './SmartContractWithAddress';
|
|
3
|
+
export declare class FixedRateExchange extends SmartContractWithAddress {
|
|
4
|
+
getDefaultAbi(): AbiItem[];
|
|
5
|
+
/**
|
|
6
|
+
* Creates unique exchange identifier.
|
|
7
|
+
* @param {String} baseToken baseToken contract address
|
|
8
|
+
* @param {String} datatoken Datatoken contract address
|
|
9
|
+
* @return {Promise<string>} exchangeId
|
|
10
|
+
*/
|
|
11
|
+
generateExchangeId(baseToken: string, datatoken: string): Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Atomic swap
|
|
14
|
+
* @param {String} exchangeId ExchangeId
|
|
15
|
+
* @param {String} datatokenAmount Amount of datatokens
|
|
16
|
+
* @param {String} maxBaseTokenAmount max amount of baseToken we want to pay for datatokenAmount
|
|
17
|
+
* @param {String} consumeMarketAddress consumeMarketAddress
|
|
18
|
+
* @param {String} consumeMarketFee consumeMarketFee in fraction
|
|
19
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
20
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
21
|
+
*/
|
|
22
|
+
buyDatatokens<G extends boolean = false>(exchangeId: string, datatokenAmount: string, maxBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
23
|
+
/**
|
|
24
|
+
* Sell datatokenAmount while expecting at least minBaseTokenAmount
|
|
25
|
+
* @param {String} exchangeId ExchangeId
|
|
26
|
+
* @param {String} datatokenAmount Amount of datatokens
|
|
27
|
+
* @param {String} minBaseTokenAmount min amount of baseToken we want to receive back
|
|
28
|
+
* @param {String} consumeMarketAddress consumeMarketAddress
|
|
29
|
+
* @param {String} consumeMarketFee consumeMarketFee in fraction
|
|
30
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
31
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
32
|
+
*/
|
|
33
|
+
sellDatatokens<G extends boolean = false>(exchangeId: string, datatokenAmount: string, minBaseTokenAmount: string, consumeMarketAddress?: string, consumeMarketFee?: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets total number of exchanges
|
|
36
|
+
* @return {Promise<Number>} no of available exchanges
|
|
37
|
+
*/
|
|
38
|
+
getNumberOfExchanges(): Promise<number>;
|
|
39
|
+
/**
|
|
40
|
+
* Set new rate
|
|
41
|
+
* @param {String} exchangeId Exchange ID
|
|
42
|
+
* @param {String} newRate New rate
|
|
43
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
44
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
45
|
+
*/
|
|
46
|
+
setRate<G extends boolean = false>(exchangeId: string, newRate: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
47
|
+
/**
|
|
48
|
+
* Sets a new allowedSwapper
|
|
49
|
+
* @param {String} exchangeId Exchange ID
|
|
50
|
+
* @param {String} newAllowedSwapper The address of the new allowed swapper (set address zero if we want to remove allowed swapper)
|
|
51
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
52
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
53
|
+
*/
|
|
54
|
+
setAllowedSwapper<G extends boolean = false>(exchangeId: string, newAllowedSwapper: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
55
|
+
/**
|
|
56
|
+
* Activate an exchange
|
|
57
|
+
* @param {String} exchangeId ExchangeId
|
|
58
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
59
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
60
|
+
*/
|
|
61
|
+
activate<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
62
|
+
/**
|
|
63
|
+
* Deactivate an exchange
|
|
64
|
+
* @param {String} exchangeId ExchangeId
|
|
65
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
66
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
67
|
+
*/
|
|
68
|
+
deactivate<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
69
|
+
/**
|
|
70
|
+
* Get Exchange Rate
|
|
71
|
+
* @param {String} exchangeId Exchange ID
|
|
72
|
+
* @return {Promise<string>} Rate (converted from wei)
|
|
73
|
+
*/
|
|
74
|
+
getRate(exchangeId: string): Promise<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Get Datatoken Supply in the exchange
|
|
77
|
+
* @param {String} exchangeId Exchange Id
|
|
78
|
+
* @return {Promise<string>} dt supply formatted
|
|
79
|
+
*/
|
|
80
|
+
getDatatokenSupply(exchangeId: string): Promise<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Returns basetoken supply in the exchange
|
|
83
|
+
* @param {String} exchangeId Exchange Id
|
|
84
|
+
* @return {Promise<string>} dt supply formatted
|
|
85
|
+
*/
|
|
86
|
+
getBasetokenSupply(exchangeId: string): Promise<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Get Allower Swapper (if set this is the only account which can use this exchange, else is set at address(0))
|
|
89
|
+
* @param {String} exchangeId Exchange Id
|
|
90
|
+
* @return {Promise<string>} address of allowed swapper
|
|
91
|
+
*/
|
|
92
|
+
getAllowedSwapper(exchangeId: string): Promise<string>;
|
|
93
|
+
/**
|
|
94
|
+
* calcBaseInGivenDatatokensOut - Calculates how many base tokens are needed to get specified amount of datatokens
|
|
95
|
+
* @param {String} exchangeId Exchange Id
|
|
96
|
+
* @param {string} datatokenAmount Amount of datatokens user wants to buy
|
|
97
|
+
* @param {String} consumeMarketFee consumeMarketFee in fraction
|
|
98
|
+
* @return {Promise<PriceAndFees>} how many base tokens are needed and fees
|
|
99
|
+
*/
|
|
100
|
+
calcBaseInGivenDatatokensOut(exchangeId: string, datatokenAmount: string, consumeMarketFee?: string): Promise<PriceAndFees>;
|
|
101
|
+
/**
|
|
102
|
+
* Returns amount in baseToken that user will receive for datatokenAmount sold
|
|
103
|
+
* @param {String} exchangeId Exchange Id
|
|
104
|
+
* @param {Number} datatokenAmount Amount of datatokens
|
|
105
|
+
* @param {String} consumeMarketFee consumeMarketFee in fraction
|
|
106
|
+
* @return {Promise<string>} Amount of baseTokens user will receive
|
|
107
|
+
*/
|
|
108
|
+
getAmountBasetokensOut(exchangeId: string, datatokenAmount: string, consumeMarketFee?: string): Promise<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Get exchange details
|
|
111
|
+
* @param {String} exchangeId Exchange Id
|
|
112
|
+
* @return {Promise<FixedPricedExchange>} Exchange details
|
|
113
|
+
*/
|
|
114
|
+
getExchange(exchangeId: string): Promise<FixedPriceExchange>;
|
|
115
|
+
/**
|
|
116
|
+
* Get fee details for an exchange
|
|
117
|
+
* @param {String} exchangeId Exchange Id
|
|
118
|
+
* @return {Promise<FeesInfo>} Exchange details
|
|
119
|
+
*/
|
|
120
|
+
getFeesInfo(exchangeId: string): Promise<FeesInfo>;
|
|
121
|
+
/**
|
|
122
|
+
* Returns all exchanges
|
|
123
|
+
* @param {String} exchangeId Exchang eId
|
|
124
|
+
* @return {Promise<String[]>} Exchanges list
|
|
125
|
+
*/
|
|
126
|
+
getExchanges(): Promise<string[]>;
|
|
127
|
+
/**
|
|
128
|
+
* Check if an exchange is active
|
|
129
|
+
* @param {String} exchangeId ExchangeId
|
|
130
|
+
* @return {Promise<Boolean>}
|
|
131
|
+
*/
|
|
132
|
+
isActive(exchangeId: string): Promise<boolean>;
|
|
133
|
+
/**
|
|
134
|
+
* Activate minting option for fixed rate contract
|
|
135
|
+
* @param {String} exchangeId Exchang eId
|
|
136
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
137
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
138
|
+
*/
|
|
139
|
+
activateMint<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
140
|
+
/**
|
|
141
|
+
* Deactivate minting for fixed rate
|
|
142
|
+
* @param {String} exchangeId ExchangeId
|
|
143
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
144
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
145
|
+
*/
|
|
146
|
+
deactivateMint<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
147
|
+
/**
|
|
148
|
+
* Collect BaseTokens in the contract (anyone can call this, funds are sent to Datatoken.paymentCollector)
|
|
149
|
+
* @param {String} exchangeId Exchange Id
|
|
150
|
+
* @param {String} amount amount to be collected
|
|
151
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
152
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
153
|
+
*/
|
|
154
|
+
collectBasetokens<G extends boolean = false>(exchangeId: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
155
|
+
/**
|
|
156
|
+
* Collect datatokens in the contract (anyone can call this, funds are sent to Datatoken.paymentCollector)
|
|
157
|
+
* @param {String} exchangeId Exchange Id
|
|
158
|
+
* @param {String} amount amount to be collected
|
|
159
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
160
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
161
|
+
*/
|
|
162
|
+
collectDatatokens<G extends boolean = false>(exchangeId: string, amount: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
163
|
+
/**
|
|
164
|
+
* Collect market fee and send it to marketFeeCollector (anyone can call it)
|
|
165
|
+
* @param {String} exchangeId Exchange Id
|
|
166
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
167
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
168
|
+
*/
|
|
169
|
+
collectMarketFee<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
170
|
+
/**
|
|
171
|
+
* Collect ocean fee and send it to OPF collector (anyone can call it)
|
|
172
|
+
* @param {String} exchangeId Exchange Id
|
|
173
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
174
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
175
|
+
*/
|
|
176
|
+
collectOceanFee<G extends boolean = false>(exchangeId: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
177
|
+
/**
|
|
178
|
+
* Get OPF Collector of fixed rate contract
|
|
179
|
+
* @return {String}
|
|
180
|
+
*/
|
|
181
|
+
getOPCCollector(): Promise<string>;
|
|
182
|
+
/**
|
|
183
|
+
* Get Router address set in fixed rate contract
|
|
184
|
+
* @return {String}
|
|
185
|
+
*/
|
|
186
|
+
getRouter(): Promise<string>;
|
|
187
|
+
/**
|
|
188
|
+
* Get Exchange Owner given an exchangeId
|
|
189
|
+
* @param {String} exchangeId Exchange Id
|
|
190
|
+
* @return {String} return exchange owner
|
|
191
|
+
*/
|
|
192
|
+
getExchangeOwner(exchangeId: string): Promise<string>;
|
|
193
|
+
/**
|
|
194
|
+
* Set new market fee, only market fee collector can update it
|
|
195
|
+
* @param {String} exchangeId Exchange Id
|
|
196
|
+
* @param {String} newMarketFee New market fee
|
|
197
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
198
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
199
|
+
*/
|
|
200
|
+
updateMarketFee<G extends boolean = false>(exchangeId: string, newMarketFee: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
201
|
+
/**
|
|
202
|
+
* Set new market fee collector, only market fee collector can update it
|
|
203
|
+
* @param {String} exchangeId Exchange Id
|
|
204
|
+
* @param {String} newMarketFeeCollector New market fee collector
|
|
205
|
+
* @param {Boolean} estimateGas if True, return gas estimate
|
|
206
|
+
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
207
|
+
*/
|
|
208
|
+
updateMarketFeeCollector<G extends boolean = false>(exchangeId: string, newMarketFeeCollector: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
209
|
+
}
|