@oceanprotocol/lib 3.2.3 → 3.3.1
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/.nvmrc +1 -1
- package/CHANGELOG.md +23 -1
- 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/package.json +1 -1
- package/dist/src/@types/Asset.d.ts +0 -148
- package/dist/src/@types/Compute.d.ts +0 -71
- package/dist/src/@types/Contracts.d.ts +0 -26
- package/dist/src/@types/DDO/ConsumerParameter.d.ts +0 -37
- package/dist/src/@types/DDO/Credentials.d.ts +0 -8
- package/dist/src/@types/DDO/DDO.d.ts +0 -55
- package/dist/src/@types/DDO/Event.d.ts +0 -27
- package/dist/src/@types/DDO/Metadata.d.ts +0 -141
- package/dist/src/@types/DDO/Service.d.ts +0 -100
- package/dist/src/@types/Datatoken.d.ts +0 -38
- package/dist/src/@types/Dispenser.d.ts +0 -16
- package/dist/src/@types/DownloadResponse.d.ts +0 -4
- package/dist/src/@types/File.d.ts +0 -89
- package/dist/src/@types/FileInfo.d.ts +0 -43
- package/dist/src/@types/FixedPrice.d.ts +0 -51
- package/dist/src/@types/NFT.d.ts +0 -18
- package/dist/src/@types/NFTFactory.d.ts +0 -20
- package/dist/src/@types/Provider.d.ts +0 -33
- package/dist/src/@types/ReturnTypes.d.ts +0 -3
- package/dist/src/@types/Router.d.ts +0 -59
- package/dist/src/@types/index.d.ts +0 -20
- package/dist/src/config/Config.d.ts +0 -153
- package/dist/src/config/ConfigHelper.d.ts +0 -12
- package/dist/src/config/index.d.ts +0 -2
- package/dist/src/contracts/Datatoken.d.ts +0 -278
- package/dist/src/contracts/Dispenser.d.ts +0 -73
- package/dist/src/contracts/FixedRateExchange.d.ts +0 -209
- package/dist/src/contracts/NFT.d.ts +0 -220
- package/dist/src/contracts/NFTFactory.d.ts +0 -165
- package/dist/src/contracts/Router.d.ts +0 -107
- package/dist/src/contracts/SmartContract.d.ts +0 -45
- package/dist/src/contracts/SmartContractWithAddress.d.ts +0 -17
- package/dist/src/contracts/df/DfRewards.d.ts +0 -31
- package/dist/src/contracts/df/DfStrategyV1.d.ts +0 -21
- package/dist/src/contracts/index.d.ts +0 -14
- package/dist/src/contracts/ve/VeAllocate.d.ts +0 -38
- package/dist/src/contracts/ve/VeFeeDistributor.d.ts +0 -29
- package/dist/src/contracts/ve/VeFeeEstimate.d.ts +0 -14
- package/dist/src/contracts/ve/VeOcean.d.ts +0 -68
- package/dist/src/index.d.ts +0 -5
- package/dist/src/services/Aquarius.d.ts +0 -53
- package/dist/src/services/Provider.d.ts +0 -197
- package/dist/src/services/index.d.ts +0 -2
- package/dist/src/utils/Constants.d.ts +0 -4
- package/dist/src/utils/ContractUtils.d.ts +0 -46
- package/dist/src/utils/DatatokenName.d.ts +0 -14
- package/dist/src/utils/DdoHelpers.d.ts +0 -13
- package/dist/src/utils/FetchHelper.d.ts +0 -14
- package/dist/src/utils/General.d.ts +0 -5
- package/dist/src/utils/Logger.d.ts +0 -19
- package/dist/src/utils/OrderUtils.d.ts +0 -20
- package/dist/src/utils/ProviderErrors.d.ts +0 -1
- package/dist/src/utils/SignatureUtils.d.ts +0 -12
- package/dist/src/utils/TokenUtils.d.ts +0 -70
- package/dist/src/utils/index.d.ts +0 -12
- package/dist/src/utils/minAbi.d.ts +0 -38
- package/dist/test/config.d.ts +0 -19
- package/dist/test/integration/CodeExamples.test.d.ts +0 -1
- package/dist/test/integration/ComputeExamples.test.d.ts +0 -1
- package/dist/test/integration/ComputeFlow.test.d.ts +0 -1
- package/dist/test/integration/Provider.test.d.ts +0 -1
- package/dist/test/integration/PublishEditConsume.test.d.ts +0 -1
- package/dist/test/integration/PublishFlows.test.d.ts +0 -1
- package/dist/test/integration/helpers.d.ts +0 -7
- package/dist/test/unit/DFRewards.test.d.ts +0 -1
- package/dist/test/unit/Datatoken.test.d.ts +0 -1
- package/dist/test/unit/Dispenser.test.d.ts +0 -1
- package/dist/test/unit/FixedRateExchange.test.d.ts +0 -1
- package/dist/test/unit/Nft.test.d.ts +0 -1
- package/dist/test/unit/NftFactory.test.d.ts +0 -1
- package/dist/test/unit/Router.test.d.ts +0 -1
- package/dist/test/unit/veOcean.test.d.ts +0 -1
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import { BigNumber } from 'ethers';
|
|
2
|
-
import { MetadataProof, MetadataAndTokenURI, NftRoles, ReceiptOrEstimate, AbiItem } from '../@types';
|
|
3
|
-
import { SmartContract } from './SmartContract';
|
|
4
|
-
export declare class Nft extends SmartContract {
|
|
5
|
-
getDefaultAbi(): AbiItem[];
|
|
6
|
-
/**
|
|
7
|
-
* Create new ERC20 Datatoken - only user with DatatokenDeployer permission can succeed
|
|
8
|
-
* @param {String} nftAddress NFT address
|
|
9
|
-
* @param {String} address User address
|
|
10
|
-
* @param {String} minter User set as initial minter for the Datatoken
|
|
11
|
-
* @param {String} paymentCollector initial paymentCollector for this DT
|
|
12
|
-
* @param {String} mpFeeAddress Consume marketplace fee address
|
|
13
|
-
* @param {String} feeToken address of the token marketplace wants to add fee on top
|
|
14
|
-
* @param {String} feeAmount amount of feeToken to be transferred to mpFeeAddress on top, will be converted to WEI
|
|
15
|
-
* @param {String} cap Maximum cap (Number) - will be converted to wei
|
|
16
|
-
* @param {String} name Token name
|
|
17
|
-
* @param {String} symbol Token symbol
|
|
18
|
-
* @param {Number} templateIndex NFT template index
|
|
19
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
20
|
-
* @return {Promise<string>} ERC20 Datatoken address
|
|
21
|
-
*/
|
|
22
|
-
createDatatoken<G extends boolean = false>(nftAddress: string, address: string, minter: string, paymentCollector: string, mpFeeAddress: string, feeToken: string, feeAmount: string, cap: string, name?: string, symbol?: string, templateIndex?: number, estimateGas?: G): Promise<G extends false ? string : BigNumber>;
|
|
23
|
-
/**
|
|
24
|
-
* Add Manager for NFT Contract (only NFT Owner can succeed)
|
|
25
|
-
* @param {String} nftAddress NFT contract address
|
|
26
|
-
* @param {String} address NFT Owner adress
|
|
27
|
-
* @param {String} manager User adress which is going to be assing manager
|
|
28
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
29
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
30
|
-
*/
|
|
31
|
-
addManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
32
|
-
/**
|
|
33
|
-
* Removes a specific manager for NFT Contract (only NFT Owner can succeed)
|
|
34
|
-
* @param {String} nftAddress NFT contract address
|
|
35
|
-
* @param {String} address NFT Owner adress
|
|
36
|
-
* @param {String} manager User adress which is going to be removed as manager
|
|
37
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
38
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
39
|
-
*/
|
|
40
|
-
removeManager<G extends boolean = false>(nftAddress: string, address: string, manager: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
41
|
-
/**
|
|
42
|
-
* Add DatatokenDeployer permission - only Manager can succeed
|
|
43
|
-
* @param {String} nftAddress NFT contract address
|
|
44
|
-
* @param {String} address NFT Manager adress
|
|
45
|
-
* @param {String} datatokenDeployer User adress which is going to have DatatokenDeployer permission
|
|
46
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
47
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
48
|
-
*/
|
|
49
|
-
addDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
50
|
-
/**
|
|
51
|
-
* Remove DatatokenDeployer permission - only Manager can succeed
|
|
52
|
-
* @param {String} nftAddress NFT contract address
|
|
53
|
-
* @param {String} address NFT Manager adress
|
|
54
|
-
* @param {String} datatokenDeployer Address of the user to be revoked DatatokenDeployer Permission
|
|
55
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
56
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
57
|
-
*/
|
|
58
|
-
removeDatatokenDeployer<G extends boolean = false>(nftAddress: string, address: string, datatokenDeployer: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
59
|
-
/**
|
|
60
|
-
* Add Metadata Updater permission - only Manager can succeed
|
|
61
|
-
* @param {String} nftAddress NFT contract address
|
|
62
|
-
* @param {String} address NFT Manager adress
|
|
63
|
-
* @param {String} metadataUpdater User adress which is going to have Metadata Updater permission
|
|
64
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
65
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
66
|
-
*/
|
|
67
|
-
addMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
68
|
-
/**
|
|
69
|
-
* Remove Metadata Updater permission - only Manager can succeed
|
|
70
|
-
* @param {String} nftAddress NFT contract address
|
|
71
|
-
* @param {String} address NFT Manager adress
|
|
72
|
-
* @param {String} metadataUpdater Address of the user to be revoked Metadata updater Permission
|
|
73
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
74
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
75
|
-
*/
|
|
76
|
-
removeMetadataUpdater<G extends boolean = false>(nftAddress: string, address: string, metadataUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
77
|
-
/**
|
|
78
|
-
* Add Store Updater permission - only Manager can succeed
|
|
79
|
-
* @param {String} nftAddress NFT contract address
|
|
80
|
-
* @param {String} address NFT Manager adress
|
|
81
|
-
* @param {String} storeUpdater User adress which is going to have Store Updater permission
|
|
82
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
83
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
84
|
-
*/
|
|
85
|
-
addStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
86
|
-
/**
|
|
87
|
-
* Remove Store Updater permission - only Manager can succeed
|
|
88
|
-
* @param {String} nftAddress NFT contract address
|
|
89
|
-
* @param {String} address NFT Manager adress
|
|
90
|
-
* @param {String} storeUpdater Address of the user to be revoked Store Updater Permission
|
|
91
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
92
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
93
|
-
*/
|
|
94
|
-
removeStoreUpdater<G extends boolean = false>(nftAddress: string, address: string, storeUpdater: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
95
|
-
/**
|
|
96
|
-
* This function allows to remove all ROLES at NFT level: Managers, DatatokenDeployer, MetadataUpdater, StoreUpdater
|
|
97
|
-
* Even NFT Owner has to readd himself as Manager
|
|
98
|
-
* Permissions at Datatoken level stay.
|
|
99
|
-
* Only NFT Owner can call it.
|
|
100
|
-
* @param {String} nftAddress NFT contract address
|
|
101
|
-
* @param {String} address NFT Owner adress
|
|
102
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
103
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
104
|
-
*/
|
|
105
|
-
cleanPermissions<G extends boolean = false>(nftAddress: string, address: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
106
|
-
/**
|
|
107
|
-
* Transfers the NFT
|
|
108
|
-
* will clean all permissions both on NFT and Datatoken level.
|
|
109
|
-
* @param {String} nftAddress NFT contract address
|
|
110
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
111
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
112
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
113
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
114
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
115
|
-
*/
|
|
116
|
-
transferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
117
|
-
/**
|
|
118
|
-
* safeTransferNFT Used for transferring the NFT, can be used by an approved relayer
|
|
119
|
-
* will clean all permissions both on NFT and Datatoken level.
|
|
120
|
-
* @param {String} nftAddress NFT contract address
|
|
121
|
-
* @param {String} nftOwner Current NFT Owner adress
|
|
122
|
-
* @param {String} nftReceiver User which will receive the NFT, will also be set as Manager
|
|
123
|
-
* @param {Number} tokenId The id of the token to be transfered
|
|
124
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
125
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
126
|
-
*/
|
|
127
|
-
safeTransferNft<G extends boolean = false>(nftAddress: string, nftOwner: string, nftReceiver: string, tokenId?: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
128
|
-
/**
|
|
129
|
-
* Creates or update Metadata cached by Aquarius. Also, updates the METADATA_DECRYPTOR key
|
|
130
|
-
* @param {String} nftAddress NFT contract address
|
|
131
|
-
* @param {String} address Caller address NFT Owner adress
|
|
132
|
-
* @param {Number} metadataState
|
|
133
|
-
* @param {String} metadataDecryptorUrl
|
|
134
|
-
* @param {String} metadataDecryptorAddress
|
|
135
|
-
* @param {String} flags
|
|
136
|
-
* @param {String} data
|
|
137
|
-
* @param {String} metadataHash
|
|
138
|
-
* @param {MetadataProof[]} metadataProofs
|
|
139
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
140
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
141
|
-
*/
|
|
142
|
-
setMetadata<G extends boolean = false>(nftAddress: string, address: string, metadataState: number, metadataDecryptorUrl: string, metadataDecryptorAddress: string, flags: string, data: string, metadataHash: string, metadataProofs?: MetadataProof[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
143
|
-
/**
|
|
144
|
-
* Helper function to improve UX sets both MetaData & TokenURI in one tx
|
|
145
|
-
* @param {String} nftAddress NFT contract address
|
|
146
|
-
* @param {String} address Caller address
|
|
147
|
-
* @param {MetadataAndTokenURI} metadataAndTokenURI metaDataAndTokenURI object
|
|
148
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
149
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
150
|
-
*/
|
|
151
|
-
setMetadataAndTokenURI<G extends boolean = false>(nftAddress: string, metadataUpdater: string, metadataAndTokenURI: MetadataAndTokenURI, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
152
|
-
/**
|
|
153
|
-
* setMetadataState Used for updating the metadata State
|
|
154
|
-
* @param {String} nftAddress NFT contract address
|
|
155
|
-
* @param {String} address Caller address => metadata updater
|
|
156
|
-
* @param {Number} metadataState new metadata state
|
|
157
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
158
|
-
* @return {Promise<ReceiptOrEstimate>} trxReceipt
|
|
159
|
-
*/
|
|
160
|
-
setMetadataState<G extends boolean = false>(nftAddress: string, address: string, metadataState: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
161
|
-
/**
|
|
162
|
-
* set TokenURI on an nft
|
|
163
|
-
* @param {String} nftAddress NFT contract address
|
|
164
|
-
* @param {String} data input data for TokenURI
|
|
165
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
166
|
-
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
167
|
-
*/
|
|
168
|
-
setTokenURI<G extends boolean = false>(nftAddress: string, data: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
169
|
-
/**
|
|
170
|
-
* Get NFT Owner
|
|
171
|
-
* @param {String} nftAddress NFT contract address
|
|
172
|
-
* @return {Promise<string>} string
|
|
173
|
-
*/
|
|
174
|
-
getNftOwner(nftAddress: string): Promise<string>;
|
|
175
|
-
/**
|
|
176
|
-
* Gets NFT Permissions for a specified user
|
|
177
|
-
* @param {String} nftAddress NFT contract address
|
|
178
|
-
* @param {String} address user adress
|
|
179
|
-
* @return {Promise<NftRoles>}
|
|
180
|
-
*/
|
|
181
|
-
getNftPermissions(nftAddress: string, address: string): Promise<NftRoles>;
|
|
182
|
-
/**
|
|
183
|
-
* Returns Metadata details for an NFT
|
|
184
|
-
* @param {String} nftAddress NFT contract address
|
|
185
|
-
* @return {Promise<Objecta>}
|
|
186
|
-
*/
|
|
187
|
-
getMetadata(nftAddress: string): Promise<Object>;
|
|
188
|
-
/**
|
|
189
|
-
* Checks if user has DatatokenDeployer role
|
|
190
|
-
* @param {String} nftAddress NFT contract address
|
|
191
|
-
* @param {String} address user adress
|
|
192
|
-
* @return {Promise<boolean>}
|
|
193
|
-
*/
|
|
194
|
-
isDatatokenDeployer(nftAddress: string, address: string): Promise<boolean>;
|
|
195
|
-
/**
|
|
196
|
-
* Allows users to store data with a preset key (keccak256(ERC20Address)) into NFT 725 Store
|
|
197
|
-
* only ERC20Deployer can succeed
|
|
198
|
-
* @param {string} nftAddress Nft datatoken adress
|
|
199
|
-
* @param {string} address User adress
|
|
200
|
-
* @param {string} key Key of the data to be stored into 725Y standard
|
|
201
|
-
* @param {string} value Data to be stored into 725Y standard
|
|
202
|
-
* @param {boolean} estimateGas if True, return gas estimate
|
|
203
|
-
* @return {Promise<ReceiptOrEstimate>} transactionId
|
|
204
|
-
*/
|
|
205
|
-
setData<G extends boolean = false>(nftAddress: string, address: string, key: string, value: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
206
|
-
/**
|
|
207
|
-
* Gets stored data at a given `key` in an NFT
|
|
208
|
-
* @param {string} nftAddress - The address of the NFT.
|
|
209
|
-
* @param {string} key - The key of the data to get.
|
|
210
|
-
* @return {Promise<string>} The data stored at the key
|
|
211
|
-
*/
|
|
212
|
-
getData(nftAddress: string, key: string): Promise<string>;
|
|
213
|
-
/**
|
|
214
|
-
* Gets the token URI of an NFT.
|
|
215
|
-
* @param {string} nftAddress - The address of the NFT.
|
|
216
|
-
* @param {number} id - The ID of the token.
|
|
217
|
-
* @returns {Promise<string>}
|
|
218
|
-
*/
|
|
219
|
-
getTokenURI(nftAddress: string, id: number): Promise<string>;
|
|
220
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { BigNumber } from 'ethers';
|
|
2
|
-
import { AbiItem, FreCreationParams, DatatokenCreateParams, DispenserCreationParams, NftCreateData, Template, TokenOrder, ReceiptOrEstimate } from '../@types';
|
|
3
|
-
import { SmartContractWithAddress } from './SmartContractWithAddress';
|
|
4
|
-
/**
|
|
5
|
-
* Provides an interface for NFT Factory contract
|
|
6
|
-
*/
|
|
7
|
-
export declare class NftFactory extends SmartContractWithAddress {
|
|
8
|
-
getDefaultAbi(): AbiItem[];
|
|
9
|
-
/**
|
|
10
|
-
* Create new data NFT
|
|
11
|
-
* @param {NFTCreateData} nftData The data needed to create an NFT.
|
|
12
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
13
|
-
* @return {Promise<string|BigNumber>} The transaction hash or the gas estimate.
|
|
14
|
-
*/
|
|
15
|
-
createNFT<G extends boolean = false>(nftData: NftCreateData, estimateGas?: G): Promise<G extends false ? string : BigNumber>;
|
|
16
|
-
/**
|
|
17
|
-
* Get Current NFT Count (NFT created)
|
|
18
|
-
* @return {Promise<number>} Number of NFT created from this factory
|
|
19
|
-
*/
|
|
20
|
-
getCurrentNFTCount(): Promise<number>;
|
|
21
|
-
/**
|
|
22
|
-
* Get Current Datatoken Count
|
|
23
|
-
* @return {Promise<number>} Number of DTs created from this factory
|
|
24
|
-
*/
|
|
25
|
-
getCurrentTokenCount(): Promise<number>;
|
|
26
|
-
/**
|
|
27
|
-
* Get Factory Owner
|
|
28
|
-
* @return {Promise<string>} Factory Owner address
|
|
29
|
-
*/
|
|
30
|
-
getOwner(): Promise<string>;
|
|
31
|
-
/**
|
|
32
|
-
* Get Current NFT Template Count
|
|
33
|
-
* @return {Promise<number>} Number of NFT Template added to this factory
|
|
34
|
-
*/
|
|
35
|
-
getCurrentNFTTemplateCount(): Promise<number>;
|
|
36
|
-
/**
|
|
37
|
-
* Get Current Template Datatoken (ERC20) Count
|
|
38
|
-
* @return {Promise<number>} Number of Datatoken Template added to this factory
|
|
39
|
-
*/
|
|
40
|
-
getCurrentTokenTemplateCount(): Promise<number>;
|
|
41
|
-
/**
|
|
42
|
-
* Get NFT Template
|
|
43
|
-
* @param {number} index Template index
|
|
44
|
-
* @return {Promise<Template>} Number of Template added to this factory
|
|
45
|
-
*/
|
|
46
|
-
getNFTTemplate(index: number): Promise<Template>;
|
|
47
|
-
/**
|
|
48
|
-
* Get Datatoken (ERC20) Template
|
|
49
|
-
* @param {number} index Template index
|
|
50
|
-
* @return {Promise<Template>} DT Template info
|
|
51
|
-
*/
|
|
52
|
-
getTokenTemplate(index: number): Promise<Template>;
|
|
53
|
-
/**
|
|
54
|
-
* Check if Datatoken is deployed from the factory
|
|
55
|
-
* @param {String} datatoken Datatoken address to check
|
|
56
|
-
* @return {Promise<Boolean>} return true if deployed from this factory
|
|
57
|
-
*/
|
|
58
|
-
checkDatatoken(datatoken: string): Promise<Boolean>;
|
|
59
|
-
/**
|
|
60
|
-
* Check if NFT is deployed from the factory
|
|
61
|
-
* @param {String} nftAddress nftAddress address to check
|
|
62
|
-
* @return {Promise<String>} return address(0) if it's not, or the nftAddress if true
|
|
63
|
-
*/
|
|
64
|
-
checkNFT(nftAddress: string): Promise<String>;
|
|
65
|
-
/**
|
|
66
|
-
* Add a new NFT token template - only factory Owner
|
|
67
|
-
* @param {String} address caller address
|
|
68
|
-
* @param {String} templateAddress template address to add
|
|
69
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
70
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
71
|
-
*/
|
|
72
|
-
addNFTTemplate<G extends boolean = false>(address: string, templateAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
73
|
-
/**
|
|
74
|
-
* Disable token template - only factory Owner
|
|
75
|
-
* @param {String} address
|
|
76
|
-
* @param {Number} templateIndex index of the template we want to disable
|
|
77
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
78
|
-
* @return {Promise<ReceiptOrEstimate>} current token template count
|
|
79
|
-
*/
|
|
80
|
-
disableNFTTemplate<G extends boolean = false>(address: string, templateIndex: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
81
|
-
/**
|
|
82
|
-
* Reactivate a previously disabled token template - only factory Owner
|
|
83
|
-
* @param {String} address
|
|
84
|
-
* @param {Number} templateIndex index of the template we want to reactivate
|
|
85
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
86
|
-
* @return {Promise<ReceiptOrEstimate>} current token template count
|
|
87
|
-
*/
|
|
88
|
-
reactivateNFTTemplate<G extends boolean = false>(address: string, templateIndex: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
89
|
-
/**
|
|
90
|
-
* Add a new NFT token template - only factory Owner
|
|
91
|
-
* @param {String} address caller address
|
|
92
|
-
* @param {String} templateAddress template address to add
|
|
93
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
94
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
95
|
-
*/
|
|
96
|
-
addTokenTemplate<G extends boolean = false>(address: string, templateAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
97
|
-
/**
|
|
98
|
-
* Disable token template - only factory Owner
|
|
99
|
-
* @param {String} address caller address
|
|
100
|
-
* @param {Number} templateIndex index of the template we want to disable
|
|
101
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
102
|
-
* @return {Promise<ReceiptOrEstimate>} current token template count
|
|
103
|
-
*/
|
|
104
|
-
disableTokenTemplate<G extends boolean = false>(address: string, templateIndex: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
105
|
-
/**
|
|
106
|
-
* Reactivate a previously disabled token template - only factory Owner
|
|
107
|
-
* @param {String} address caller address
|
|
108
|
-
* @param {Number} templateIndex index of the template we want to reactivate
|
|
109
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
110
|
-
* @return {Promise<ReceiptOrEstimate>} current token template count
|
|
111
|
-
*/
|
|
112
|
-
reactivateTokenTemplate<G extends boolean = false>(address: string, templateIndex: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
113
|
-
/**
|
|
114
|
-
* Used as a proxy to order multiple services
|
|
115
|
-
* Users can have inifinite approvals for fees for factory instead of having one approval/ Datatoken contract
|
|
116
|
-
* Requires previous approval of all :
|
|
117
|
-
* - consumeFeeTokens
|
|
118
|
-
* - publishMarketFeeTokens
|
|
119
|
-
* - ERC20 Datatokens
|
|
120
|
-
* @param {TokenOrder[]} orders array of of orders
|
|
121
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
122
|
-
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
123
|
-
*/
|
|
124
|
-
startMultipleTokenOrder<G extends boolean = false>(orders: TokenOrder[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
125
|
-
/**
|
|
126
|
-
* Creates a new NFT, then a datatoken,all in one call
|
|
127
|
-
* @param {NftCreateData} nftCreateData - The data required to create an NFT.
|
|
128
|
-
* @param {DatatokenCreateParams} dtParams - The parameters required to create a datatoken.
|
|
129
|
-
* @param {boolean} [estimateGas] - Whether to return only estimate gas or not.
|
|
130
|
-
* @return {Promise<ReceiptOrEstimate>} transaction receipt
|
|
131
|
-
*/
|
|
132
|
-
createNftWithDatatoken<G extends boolean = false>(nftCreateData: NftCreateData, dtParams: DatatokenCreateParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
133
|
-
/**
|
|
134
|
-
* Creates an NFT with a datatoken with a fixed rate all in one call.
|
|
135
|
-
* be aware if Fixed Rate creation fails, you are still going to pay a lot of gas
|
|
136
|
-
* @param {NftCreateData} nftCreateData - The data required to create an NFT.
|
|
137
|
-
* @param {DatatokenCreateParams} dtParams - The parameters required to create a datatoken.
|
|
138
|
-
* @param {FreCreationParams} freParams - The parameters required to create a fixed-rate exchange contract.
|
|
139
|
-
* @param {boolean} [estimateGas] - Whether to return only estimate gas or not.
|
|
140
|
-
* @returns {Promis<ReceiptOrEstimate<G>>}
|
|
141
|
-
*/
|
|
142
|
-
createNftWithDatatokenWithFixedRate<G extends boolean = false>(nftCreateData: NftCreateData, dtParams: DatatokenCreateParams, freParams: FreCreationParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
143
|
-
/**
|
|
144
|
-
* Creates an NFT with a datatoken with a dispenser in one call.
|
|
145
|
-
* Be aware if Fixed Rate creation fails, you are still going to pay a lot of gas
|
|
146
|
-
* @param {NftCreateData} nftCreateData - The data required to create an NFT.
|
|
147
|
-
* @param {DatatokenCreateParams} dtParams - The parameters required to create a datatoken.
|
|
148
|
-
* @param {DispenserCreationParams} dispenserParams - The parameters required to create a dispenser contract.
|
|
149
|
-
* @param {boolean} [estimateGas] - Whether to estimate gas or not.
|
|
150
|
-
* @returns {Promis<ReceiptOrEstimate<G>>}
|
|
151
|
-
*/
|
|
152
|
-
createNftWithDatatokenWithDispenser<G extends boolean = false>(nftCreateData: NftCreateData, dtParams: DatatokenCreateParams, dispenserParams: DispenserCreationParams, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
153
|
-
/**
|
|
154
|
-
* Gets the parameters required to create an ERC20 token.
|
|
155
|
-
* @param {DatatokenCreateParams} dtParams - The parameters required to create a datatoken.
|
|
156
|
-
* @returns {Promise<any>}
|
|
157
|
-
*/
|
|
158
|
-
private getErcCreationParams;
|
|
159
|
-
/**
|
|
160
|
-
* Gets the parameters required to create a fixed-rate exchange contract.
|
|
161
|
-
* @param {FreCreationParams} freParams - The parameters required to create a fixed-rate exchange contract.
|
|
162
|
-
* @returns {Promise<any> }
|
|
163
|
-
*/
|
|
164
|
-
private getFreCreationParams;
|
|
165
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { Operation, ReceiptOrEstimate, AbiItem } from '../@types';
|
|
2
|
-
import { SmartContractWithAddress } from './SmartContractWithAddress';
|
|
3
|
-
/**
|
|
4
|
-
* Provides an interface for FactoryRouter contract
|
|
5
|
-
*/
|
|
6
|
-
export declare class Router extends SmartContractWithAddress {
|
|
7
|
-
getDefaultAbi(): AbiItem[];
|
|
8
|
-
/**
|
|
9
|
-
* * Buys a batch of datatokens.
|
|
10
|
-
* one single call to buy multiple DT for multiple assets.
|
|
11
|
-
* require tokenIn approvals for router from user. (except for dispenser operations)
|
|
12
|
-
* @param {Operation[]} operations - The operations to execute.
|
|
13
|
-
* @param {boolean} [estimateGas=false] - Whether to return only the estimate gas or not.
|
|
14
|
-
* @return {Promise<ReceiptOrEstimate>} Transaction receipt
|
|
15
|
-
*/
|
|
16
|
-
buyDatatokenBatch<G extends boolean = false>(operations: Operation[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
17
|
-
/**
|
|
18
|
-
* Checks if a token is on approved tokens list,
|
|
19
|
-
* if true opfFee is lower in pools with that token/DT
|
|
20
|
-
* @param {string} address - The address of the token to check.
|
|
21
|
-
* @return {Promise<boolean>} true if is on the list.
|
|
22
|
-
*/
|
|
23
|
-
isApprovedToken(address: string): Promise<boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Check if an address is a Fixed Rate contract.
|
|
26
|
-
* @param {string} address - The address of the fixed rate exchange to check.
|
|
27
|
-
* @return {Promise<boolean>} true if is a Fixed Rate contract
|
|
28
|
-
*/
|
|
29
|
-
isFixedPrice(address: string): Promise<boolean>;
|
|
30
|
-
/**
|
|
31
|
-
* Get Router Owner
|
|
32
|
-
* @return {Promise<string>} Router Owner address
|
|
33
|
-
*/
|
|
34
|
-
getOwner(): Promise<string>;
|
|
35
|
-
/**
|
|
36
|
-
* Get NFT Factory address
|
|
37
|
-
* @return {Promise<string>} NFT Factory address
|
|
38
|
-
*/
|
|
39
|
-
getNFTFactory(): Promise<string>;
|
|
40
|
-
/**
|
|
41
|
-
* Adds a token to the list of tokens with reduced fees
|
|
42
|
-
* @param {String} address caller address
|
|
43
|
-
* @param {String} tokenAddress token address to add
|
|
44
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
45
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
46
|
-
*/
|
|
47
|
-
addApprovedToken<G extends boolean = false>(address: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
48
|
-
/**
|
|
49
|
-
* Removes a token if exists from the list of tokens with reduced fees
|
|
50
|
-
* @param {String} address caller address
|
|
51
|
-
* @param {String} tokenAddress token address to remove
|
|
52
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
53
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
54
|
-
*/
|
|
55
|
-
removeApprovedToken<G extends boolean = false>(address: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
56
|
-
/**
|
|
57
|
-
* Adds an address to the list of fixed rate contracts
|
|
58
|
-
* @param {String} address caller address
|
|
59
|
-
* @param {String} tokenAddress contract address to add
|
|
60
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
61
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
62
|
-
*/
|
|
63
|
-
addFixedRateContract<G extends boolean = false>(address: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
64
|
-
/**
|
|
65
|
-
* Removes an address from the list of fixed rate contracts
|
|
66
|
-
* @param {String} address caller address
|
|
67
|
-
* @param {String} tokenAddress contract address to add
|
|
68
|
-
* @param {Boolean} [estimateGas] if True, return gas estimate
|
|
69
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
70
|
-
*/
|
|
71
|
-
removeFixedRateContract<G extends boolean = false>(address: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
72
|
-
/**
|
|
73
|
-
* Adds an address to the list of dispensers
|
|
74
|
-
* @param {String} address caller address
|
|
75
|
-
* @param {String} tokenAddress contract address to add
|
|
76
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
77
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
78
|
-
*/
|
|
79
|
-
addDispenserContract<G extends boolean = false>(address: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
80
|
-
/**
|
|
81
|
-
* Removes an address from the list of dispensers
|
|
82
|
-
* @param {String} address caller address
|
|
83
|
-
* @param {String} tokenAddress address Contract to be removed
|
|
84
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
85
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
86
|
-
*/
|
|
87
|
-
removeDispenserContract<G extends boolean = false>(address: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
88
|
-
/** Get OPF Fee per token
|
|
89
|
-
* @return {Promise<number>} OPC fee for a specific baseToken
|
|
90
|
-
*/
|
|
91
|
-
getOPCFee(baseToken: string): Promise<number>;
|
|
92
|
-
/** Get Current OPF Fee
|
|
93
|
-
* @return {Promise<number>} OPF fee
|
|
94
|
-
*/
|
|
95
|
-
getCurrentOPCFee(): Promise<number>;
|
|
96
|
-
/**
|
|
97
|
-
* Updates OP Community Fees
|
|
98
|
-
* @param {String} address caller address
|
|
99
|
-
* @param {number} newSwapOceanFee Amount charged for swapping with ocean approved tokens
|
|
100
|
-
* @param {number} newSwapNonOceanFee Amount charged for swapping with non ocean approved tokens
|
|
101
|
-
* @param {number} newConsumeFee Amount charged from consumeFees
|
|
102
|
-
* @param {number} newProviderFee Amount charged for providerFees
|
|
103
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
104
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
105
|
-
*/
|
|
106
|
-
updateOPCFee<G extends boolean = false>(address: string, newSwapOceanFee: number, newSwapNonOceanFee: number, newConsumeFee: number, newProviderFee: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
107
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Signer, Contract } from 'ethers';
|
|
2
|
-
import { AbiItem } from '../@types';
|
|
3
|
-
import { Config } from '../config';
|
|
4
|
-
export declare abstract class SmartContract {
|
|
5
|
-
signer: Signer;
|
|
6
|
-
config: Config;
|
|
7
|
-
abi: AbiItem[];
|
|
8
|
-
abstract getDefaultAbi(): any;
|
|
9
|
-
/**
|
|
10
|
-
* Instantiate the smart contract.
|
|
11
|
-
* @param {Signer} signer The signer object.
|
|
12
|
-
* @param {string | number} [network] Network id or name
|
|
13
|
-
* @param {Config} [config] The configuration object.
|
|
14
|
-
* @param {AbiItem[]} [abi] ABI array of the smart contract
|
|
15
|
-
*/
|
|
16
|
-
constructor(signer: Signer, network?: string | number, config?: Config, abi?: AbiItem[]);
|
|
17
|
-
/**
|
|
18
|
-
* Converts an amount of tokens to units
|
|
19
|
-
* @param {string} token - The token to convert
|
|
20
|
-
* @param {string} amount - The amount of tokens to convert
|
|
21
|
-
* @param {number} [tokenDecimals] - The number of decimals of the token
|
|
22
|
-
* @returns {Promise<string>} - The converted amount in units
|
|
23
|
-
*/
|
|
24
|
-
protected amountToUnits(token: string, amount: string, tokenDecimals?: number): Promise<string>;
|
|
25
|
-
/**
|
|
26
|
-
* Converts an amount of units to tokens
|
|
27
|
-
* @param {string} token - The token to convert
|
|
28
|
-
* @param {string} amount - The amount of units to convert
|
|
29
|
-
* @param {number} [tokenDecimals] - The number of decimals in the token
|
|
30
|
-
* @returns {Promise<string>} - The converted amount in tokens
|
|
31
|
-
*/
|
|
32
|
-
protected unitsToAmount(token: string, amount: string, tokenDecimals?: number): Promise<string>;
|
|
33
|
-
/**
|
|
34
|
-
* Retruns the gas price
|
|
35
|
-
* @returns {Promise<string>} - The fair gas price
|
|
36
|
-
*/
|
|
37
|
-
protected getFairGasPrice(): Promise<string>;
|
|
38
|
-
/**
|
|
39
|
-
* Returns a contract instance for the given address
|
|
40
|
-
* @param {string} address - The address of the contract
|
|
41
|
-
* @param {AbiItem[]} [abi] - The ABI of the contract
|
|
42
|
-
* @returns {Contract} - The contract instance
|
|
43
|
-
*/
|
|
44
|
-
protected getContract(address: string, abi?: AbiItem[]): Contract;
|
|
45
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Signer, Contract } from 'ethers';
|
|
2
|
-
import { AbiItem } from '../@types';
|
|
3
|
-
import { Config } from '../config';
|
|
4
|
-
import { SmartContract } from './SmartContract';
|
|
5
|
-
export declare abstract class SmartContractWithAddress extends SmartContract {
|
|
6
|
-
address: string;
|
|
7
|
-
contract: Contract;
|
|
8
|
-
/**
|
|
9
|
-
* Instantiate the smart contract.
|
|
10
|
-
* @param {string} address The address of the contract.
|
|
11
|
-
* @param {Signer} signer The signer object.
|
|
12
|
-
* @param {string | number} network Network id or name
|
|
13
|
-
* @param {Config} config The configuration object.
|
|
14
|
-
* @param {AbiItem[]} abi ABI array of the smart contract
|
|
15
|
-
*/
|
|
16
|
-
constructor(address: string, signer: Signer, network?: string | number, config?: Config, abi?: AbiItem[]);
|
|
17
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { SmartContractWithAddress } from '../SmartContractWithAddress';
|
|
2
|
-
import { AbiItem, ReceiptOrEstimate } from '../../@types';
|
|
3
|
-
/**
|
|
4
|
-
* Provides an interface for DFRewards contract
|
|
5
|
-
*/
|
|
6
|
-
export declare class DfRewards extends SmartContractWithAddress {
|
|
7
|
-
getDefaultAbi(): AbiItem[];
|
|
8
|
-
/** Get available DF Rewards for a token
|
|
9
|
-
* @param {String} userAddress user address
|
|
10
|
-
* @param {String} tokenAddress token address
|
|
11
|
-
* @return {Promise<string>}
|
|
12
|
-
*/
|
|
13
|
-
getAvailableRewards(userAddress: string, tokenAddress: string): Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* claim rewards for any address
|
|
16
|
-
* @param {String} userAddress user address to claim
|
|
17
|
-
* @param {String} tokenAddress token address
|
|
18
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
19
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
20
|
-
*/
|
|
21
|
-
claimRewards<G extends boolean = false>(userAddress: string, tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
22
|
-
/**
|
|
23
|
-
* allocate rewards to address. An approve must exist before calling this function.
|
|
24
|
-
* @param {String[]} userAddresses array of users that will receive rewards
|
|
25
|
-
* @param {String[]} amounts array of amounts
|
|
26
|
-
* @param {String} tokenAddress token address
|
|
27
|
-
* @param {Boolean} estimateGas if True, return gas estimate
|
|
28
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
29
|
-
*/
|
|
30
|
-
allocateRewards<G extends boolean = false>(userAddresses: string[], amounts: string[], tokenAddress: string, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
31
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SmartContractWithAddress } from '../SmartContractWithAddress';
|
|
2
|
-
import { ReceiptOrEstimate, AbiItem } from '../../@types';
|
|
3
|
-
/**
|
|
4
|
-
* Provides an interface for dfStrategyV1 contract
|
|
5
|
-
*/
|
|
6
|
-
export declare class DfStrategyV1 extends SmartContractWithAddress {
|
|
7
|
-
getDefaultAbi(): AbiItem[];
|
|
8
|
-
/** Get available DF Rewards for multiple tokens
|
|
9
|
-
* @param {String} userAddress user address
|
|
10
|
-
* @param {String} tokenAddresses array of tokens
|
|
11
|
-
* @return {Promise<string[]>}
|
|
12
|
-
*/
|
|
13
|
-
getMultipleAvailableRewards(userAddress: string, tokenAddresses: string[]): Promise<string[]>;
|
|
14
|
-
/**
|
|
15
|
-
* claim multiple token rewards for any address
|
|
16
|
-
* @param {String} userAddress user address to claim
|
|
17
|
-
* @param {String} tokenAddresses array of tokens
|
|
18
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
19
|
-
*/
|
|
20
|
-
claimMultipleRewards<G extends boolean = false>(userAddress: string, tokenAddresses: string[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
21
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './SmartContract';
|
|
2
|
-
export * from './SmartContractWithAddress';
|
|
3
|
-
export * from './Dispenser';
|
|
4
|
-
export * from './FixedRateExchange';
|
|
5
|
-
export * from './Router';
|
|
6
|
-
export * from './Datatoken';
|
|
7
|
-
export * from './NFT';
|
|
8
|
-
export * from './NFTFactory';
|
|
9
|
-
export * from './ve/VeOcean';
|
|
10
|
-
export * from './ve/VeFeeDistributor';
|
|
11
|
-
export * from './ve/VeFeeEstimate';
|
|
12
|
-
export * from './ve/VeAllocate';
|
|
13
|
-
export * from './df/DfRewards';
|
|
14
|
-
export * from './df/DfStrategyV1';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { SmartContractWithAddress } from '../SmartContractWithAddress';
|
|
2
|
-
import { ReceiptOrEstimate, AbiItem } from '../../@types';
|
|
3
|
-
/**
|
|
4
|
-
* Provides an interface for veOcean contract
|
|
5
|
-
*/
|
|
6
|
-
export declare class VeAllocate extends SmartContractWithAddress {
|
|
7
|
-
getDefaultAbi(): AbiItem[];
|
|
8
|
-
/**
|
|
9
|
-
* set a specific percentage of veOcean to a specific nft
|
|
10
|
-
* Maximum allocated percentage is 10000, so 1% is specified as 100
|
|
11
|
-
* @param {String} amount Percentage used
|
|
12
|
-
* @param {String} nft NFT address to allocate to
|
|
13
|
-
* @param {String} chainId chainId of NFT
|
|
14
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
15
|
-
*/
|
|
16
|
-
setAllocation<G extends boolean = false>(amount: string, nft: string, chainId: number, estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
17
|
-
/**
|
|
18
|
-
* set specific percetage of veOcean to multiple nfts
|
|
19
|
-
* Maximum allocated percentage is 10000, so 1% is specified as 100
|
|
20
|
-
* @param {String[]} amount Array of percentages used
|
|
21
|
-
* @param {String[]} nft Array of NFT addresses
|
|
22
|
-
* @param {String[]} chainId Array of chainIds
|
|
23
|
-
* @return {Promise<ReceiptOrEstimate>}
|
|
24
|
-
*/
|
|
25
|
-
setBatchAllocation<G extends boolean = false>(amount: string[], nft: string[], chainId: number[], estimateGas?: G): Promise<ReceiptOrEstimate<G>>;
|
|
26
|
-
/** Get totalAllocation for address
|
|
27
|
-
* @param {String} userAddress user address
|
|
28
|
-
* @return {Promise<number>}
|
|
29
|
-
*/
|
|
30
|
-
getTotalAllocation(userAddress: string): Promise<number>;
|
|
31
|
-
/** Get getveAllocation for address, nft, chainId
|
|
32
|
-
* @param {String} userAddress user address
|
|
33
|
-
* @param {String} nft NFT address to allocate to
|
|
34
|
-
* @param {String} chainId chainId of NFT
|
|
35
|
-
* @return {Promise<number>}
|
|
36
|
-
*/
|
|
37
|
-
getVeAllocation(userAddress: string, nft: string, chainId: string): Promise<number>;
|
|
38
|
-
}
|