@dodoex/dodo-contract-request 1.6.0-alpha.3 → 1.6.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.
- package/CHANGELOG.md +0 -27
- package/dist/types/contract/BuyoutModel.d.ts +12 -12
- package/dist/types/contract/CP.d.ts +80 -68
- package/dist/types/contract/CrowdPoolingFactory.d.ts +44 -38
- package/dist/types/contract/CustomERC20.d.ts +22 -22
- package/dist/types/contract/CustomMintableERC20.d.ts +22 -22
- package/dist/types/contract/D3Proxy.d.ts +8 -8
- package/dist/types/contract/D3Vault.d.ts +174 -96
- package/dist/types/contract/DODOApprove.d.ts +12 -12
- package/dist/types/contract/DODOApproveProxy.d.ts +14 -14
- package/dist/types/contract/DODOCalleeHelper.d.ts +2 -2
- package/dist/types/contract/DODOCirculationHelper.d.ts +14 -14
- package/dist/types/contract/DODOCpProxy.d.ts +6 -6
- package/dist/types/contract/DODOCpProxyWithoutGlobalQuota.d.ts +6 -6
- package/dist/types/contract/DODODppProxy.d.ts +6 -6
- package/dist/types/contract/DODODspProxy.d.ts +8 -8
- package/dist/types/contract/DODODspProxyWithoutGSP.d.ts +6 -6
- package/dist/types/contract/DODOIncentive.d.ts +34 -22
- package/dist/types/contract/DODOMineV2Factory.d.ts +14 -14
- package/dist/types/contract/DODOMineV3Proxy.d.ts +12 -12
- package/dist/types/contract/DODOMineV3ProxyWithoutPlatform.d.ts +12 -12
- package/dist/types/contract/DODOMineV3Registry.d.ts +12 -12
- package/dist/types/contract/DODONFT.d.ts +28 -28
- package/dist/types/contract/DODONFT1155.d.ts +16 -16
- package/dist/types/contract/DODONFTApprove.d.ts +12 -12
- package/dist/types/contract/DODONFTPoolProxy.d.ts +20 -20
- package/dist/types/contract/DODONFTProxy.d.ts +24 -24
- package/dist/types/contract/DODONFTRegistry.d.ts +20 -14
- package/dist/types/contract/DODONFTRouteHelper.d.ts +4 -4
- package/dist/types/contract/DODOSellHelper.d.ts +4 -4
- package/dist/types/contract/DODOStarterProxy.d.ts +4 -4
- package/dist/types/contract/DODOV1.d.ts +84 -78
- package/dist/types/contract/DODOV1Adapter.d.ts +2 -2
- package/dist/types/contract/DODOV1PmmHelper.d.ts +2 -2
- package/dist/types/contract/DODOV1Proxy.d.ts +2 -2
- package/dist/types/contract/DODOV2Proxy02.d.ts +26 -26
- package/dist/types/contract/DODOV2RouteHelper.d.ts +8 -8
- package/dist/types/contract/DPPAdvanced.d.ts +118 -54
- package/dist/types/contract/DPPAdvancedAdmin.d.ts +14 -14
- package/dist/types/contract/DPPFactory.d.ts +34 -28
- package/dist/types/contract/DSP.d.ts +134 -70
- package/dist/types/contract/DSPFactory.d.ts +28 -22
- package/dist/types/contract/DVM.d.ts +120 -64
- package/dist/types/contract/DVMFactory.d.ts +28 -22
- package/dist/types/contract/ERC20.d.ts +12 -12
- package/dist/types/contract/ERC20Helper.d.ts +46 -8
- package/dist/types/contract/ERC20MineV3.d.ts +46 -26
- package/dist/types/contract/ERC20V3Factory.d.ts +30 -22
- package/dist/types/contract/FeeRateDIP3Impl.d.ts +38 -20
- package/dist/types/contract/FeeRateModel.d.ts +8 -8
- package/dist/types/contract/GSP.d.ts +152 -82
- package/dist/types/contract/GSPFactory.d.ts +26 -20
- package/dist/types/contract/InitializableERC20.d.ts +14 -14
- package/dist/types/contract/LimitOrder.d.ts +20 -20
- package/dist/types/contract/LimitOrderBot.d.ts +12 -12
- package/dist/types/contract/MulticallWithValid.d.ts +14 -14
- package/dist/types/contract/PermissionManager.d.ts +8 -8
- package/dist/types/contract/UniswapV2Factory.d.ts +10 -10
- package/dist/types/contract/UniswapV2Pair.d.ts +46 -38
- package/dist/types/contract/UniswapV2Router02.d.ts +14 -14
- package/dist/types/contract/dodoTeam.d.ts +34 -28
- package/dist/types/contract/vDODOToken.d.ts +84 -60
- package/package.json +2 -2
- package/src/contract/BuyoutModel.ts +6 -6
- package/src/contract/CP.ts +40 -34
- package/src/contract/CrowdPoolingFactory.ts +22 -19
- package/src/contract/CustomERC20.ts +11 -11
- package/src/contract/CustomMintableERC20.ts +11 -11
- package/src/contract/D3Proxy.ts +4 -4
- package/src/contract/D3Vault.ts +87 -48
- package/src/contract/DODOApprove.ts +6 -6
- package/src/contract/DODOApproveProxy.ts +7 -7
- package/src/contract/DODOCalleeHelper.ts +1 -1
- package/src/contract/DODOCirculationHelper.ts +7 -7
- package/src/contract/DODOCpProxy.ts +3 -3
- package/src/contract/DODOCpProxyWithoutGlobalQuota.ts +3 -3
- package/src/contract/DODODppProxy.ts +3 -3
- package/src/contract/DODODspProxy.ts +4 -4
- package/src/contract/DODODspProxyWithoutGSP.ts +3 -3
- package/src/contract/DODOIncentive.ts +17 -11
- package/src/contract/DODOMineV2Factory.ts +7 -7
- package/src/contract/DODOMineV3Proxy.ts +6 -6
- package/src/contract/DODOMineV3ProxyWithoutPlatform.ts +6 -6
- package/src/contract/DODOMineV3Registry.ts +6 -6
- package/src/contract/DODONFT.ts +14 -14
- package/src/contract/DODONFT1155.ts +8 -8
- package/src/contract/DODONFTApprove.ts +6 -6
- package/src/contract/DODONFTPoolProxy.ts +10 -10
- package/src/contract/DODONFTProxy.ts +12 -12
- package/src/contract/DODONFTRegistry.ts +10 -7
- package/src/contract/DODONFTRouteHelper.ts +2 -2
- package/src/contract/DODOSellHelper.ts +2 -2
- package/src/contract/DODOStarterProxy.ts +2 -2
- package/src/contract/DODOV1.ts +42 -39
- package/src/contract/DODOV1Adapter.ts +1 -1
- package/src/contract/DODOV1PmmHelper.ts +1 -1
- package/src/contract/DODOV1Proxy.ts +1 -1
- package/src/contract/DODOV2Proxy02.ts +13 -13
- package/src/contract/DODOV2RouteHelper.ts +4 -4
- package/src/contract/DPPAdvanced.ts +51 -27
- package/src/contract/DPPAdvancedAdmin.ts +7 -7
- package/src/contract/DPPFactory.ts +17 -14
- package/src/contract/DSP.ts +59 -35
- package/src/contract/DSPFactory.ts +14 -11
- package/src/contract/DVM.ts +52 -32
- package/src/contract/DVMFactory.ts +14 -11
- package/src/contract/ERC20.ts +6 -6
- package/src/contract/ERC20Helper.ts +23 -4
- package/src/contract/ERC20MineV3.ts +23 -13
- package/src/contract/ERC20V3Factory.ts +15 -11
- package/src/contract/FeeRateDIP3Impl.ts +19 -10
- package/src/contract/FeeRateModel.ts +4 -4
- package/src/contract/GSP.ts +68 -41
- package/src/contract/GSPFactory.ts +13 -10
- package/src/contract/InitializableERC20.ts +7 -7
- package/src/contract/LimitOrder.ts +10 -10
- package/src/contract/LimitOrderBot.ts +6 -6
- package/src/contract/MulticallWithValid.ts +7 -7
- package/src/contract/PermissionManager.ts +4 -4
- package/src/contract/UniswapV2Factory.ts +5 -5
- package/src/contract/UniswapV2Pair.ts +23 -19
- package/src/contract/UniswapV2Router02.ts +7 -7
- package/src/contract/dodoTeam.ts +17 -14
- package/src/contract/vDODOToken.ts +42 -30
package/src/contract/DVM.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { contractRequests } from '../contractRequests';
|
|
|
10
10
|
* @param {string} __to - string
|
|
11
11
|
* @returns {string} __output0 - bytes32
|
|
12
12
|
*/
|
|
13
|
-
export function fetchDVMDOMAIN_SEPARATOR(chainId: number, __to: string) {
|
|
13
|
+
export function fetchDVMDOMAIN_SEPARATOR(chainId: number, __to: string): Promise<string> {
|
|
14
14
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
15
15
|
const __data = hexlify(concat(['0x3644e515', __encodeData]));
|
|
16
16
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"","type":"bytes32"}])
|
|
@@ -31,7 +31,7 @@ export function getFetchDVMDOMAIN_SEPARATORQueryOptions(chainId: number | undefi
|
|
|
31
31
|
* @param {string} __to - string
|
|
32
32
|
* @returns {string} __output0 - bytes32
|
|
33
33
|
*/
|
|
34
|
-
export function fetchDVMPERMIT_TYPEHASH(chainId: number, __to: string) {
|
|
34
|
+
export function fetchDVMPERMIT_TYPEHASH(chainId: number, __to: string): Promise<string> {
|
|
35
35
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
36
36
|
const __data = hexlify(concat(['0x30adf81f', __encodeData]));
|
|
37
37
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"","type":"bytes32"}])
|
|
@@ -52,7 +52,7 @@ export function getFetchDVMPERMIT_TYPEHASHQueryOptions(chainId: number | undefin
|
|
|
52
52
|
* @param {string} __to - string
|
|
53
53
|
* @returns {bigint} __output0 - uint256
|
|
54
54
|
*/
|
|
55
|
-
export function fetchDVM_BASE_PRICE_CUMULATIVE_LAST_(chainId: number, __to: string) {
|
|
55
|
+
export function fetchDVM_BASE_PRICE_CUMULATIVE_LAST_(chainId: number, __to: string): Promise<bigint> {
|
|
56
56
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
57
57
|
const __data = hexlify(concat(['0xfe24cb7f', __encodeData]));
|
|
58
58
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -73,7 +73,7 @@ export function getFetchDVM_BASE_PRICE_CUMULATIVE_LAST_QueryOptions(chainId: num
|
|
|
73
73
|
* @param {string} __to - string
|
|
74
74
|
* @returns {bigint} __output0 - uint112
|
|
75
75
|
*/
|
|
76
|
-
export function fetchDVM_BASE_RESERVE_(chainId: number, __to: string) {
|
|
76
|
+
export function fetchDVM_BASE_RESERVE_(chainId: number, __to: string): Promise<bigint> {
|
|
77
77
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
78
78
|
const __data = hexlify(concat(['0x7d721504', __encodeData]));
|
|
79
79
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint112","name":"","type":"uint112"}])
|
|
@@ -94,7 +94,7 @@ export function getFetchDVM_BASE_RESERVE_QueryOptions(chainId: number | undefine
|
|
|
94
94
|
* @param {string} __to - string
|
|
95
95
|
* @returns {string} __output0 - address
|
|
96
96
|
*/
|
|
97
|
-
export function fetchDVM_BASE_TOKEN_(chainId: number, __to: string) {
|
|
97
|
+
export function fetchDVM_BASE_TOKEN_(chainId: number, __to: string): Promise<string> {
|
|
98
98
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
99
99
|
const __data = hexlify(concat(['0x4a248d2a', __encodeData]));
|
|
100
100
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"contract IERC20","name":"","type":"address"}])
|
|
@@ -115,7 +115,7 @@ export function getFetchDVM_BASE_TOKEN_QueryOptions(chainId: number | undefined,
|
|
|
115
115
|
* @param {string} __to - string
|
|
116
116
|
* @returns {bigint} __output0 - uint32
|
|
117
117
|
*/
|
|
118
|
-
export function fetchDVM_BLOCK_TIMESTAMP_LAST_(chainId: number, __to: string) {
|
|
118
|
+
export function fetchDVM_BLOCK_TIMESTAMP_LAST_(chainId: number, __to: string): Promise<bigint> {
|
|
119
119
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
120
120
|
const __data = hexlify(concat(['0x880a4d87', __encodeData]));
|
|
121
121
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint32","name":"","type":"uint32"}])
|
|
@@ -136,7 +136,7 @@ export function getFetchDVM_BLOCK_TIMESTAMP_LAST_QueryOptions(chainId: number |
|
|
|
136
136
|
* @param {string} __to - string
|
|
137
137
|
* @returns {boolean} __output0 - bool
|
|
138
138
|
*/
|
|
139
|
-
export function fetchDVM_IS_OPEN_TWAP_(chainId: number, __to: string) {
|
|
139
|
+
export function fetchDVM_IS_OPEN_TWAP_(chainId: number, __to: string): Promise<boolean> {
|
|
140
140
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
141
141
|
const __data = hexlify(concat(['0x2df6cb48', __encodeData]));
|
|
142
142
|
return contractRequests.batchCall<boolean>(chainId, __to, __data, [{"internalType":"bool","name":"","type":"bool"}])
|
|
@@ -157,7 +157,7 @@ export function getFetchDVM_IS_OPEN_TWAP_QueryOptions(chainId: number | undefine
|
|
|
157
157
|
* @param {string} __to - string
|
|
158
158
|
* @returns {bigint} __output0 - uint256
|
|
159
159
|
*/
|
|
160
|
-
export function fetchDVM_I_(chainId: number, __to: string) {
|
|
160
|
+
export function fetchDVM_I_(chainId: number, __to: string): Promise<bigint> {
|
|
161
161
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
162
162
|
const __data = hexlify(concat(['0xf811d692', __encodeData]));
|
|
163
163
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -178,7 +178,7 @@ export function getFetchDVM_I_QueryOptions(chainId: number | undefined, __to: st
|
|
|
178
178
|
* @param {string} __to - string
|
|
179
179
|
* @returns {bigint} __output0 - uint256
|
|
180
180
|
*/
|
|
181
|
-
export function fetchDVM_K_(chainId: number, __to: string) {
|
|
181
|
+
export function fetchDVM_K_(chainId: number, __to: string): Promise<bigint> {
|
|
182
182
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
183
183
|
const __data = hexlify(concat(['0xec2fd46d', __encodeData]));
|
|
184
184
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -199,7 +199,7 @@ export function getFetchDVM_K_QueryOptions(chainId: number | undefined, __to: st
|
|
|
199
199
|
* @param {string} __to - string
|
|
200
200
|
* @returns {bigint} __output0 - uint256
|
|
201
201
|
*/
|
|
202
|
-
export function fetchDVM_LP_FEE_RATE_(chainId: number, __to: string) {
|
|
202
|
+
export function fetchDVM_LP_FEE_RATE_(chainId: number, __to: string): Promise<bigint> {
|
|
203
203
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
204
204
|
const __data = hexlify(concat(['0xab44a7a3', __encodeData]));
|
|
205
205
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -220,7 +220,7 @@ export function getFetchDVM_LP_FEE_RATE_QueryOptions(chainId: number | undefined
|
|
|
220
220
|
* @param {string} __to - string
|
|
221
221
|
* @returns {string} __output0 - address
|
|
222
222
|
*/
|
|
223
|
-
export function fetchDVM_MAINTAINER_(chainId: number, __to: string) {
|
|
223
|
+
export function fetchDVM_MAINTAINER_(chainId: number, __to: string): Promise<string> {
|
|
224
224
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
225
225
|
const __data = hexlify(concat(['0x4322ec83', __encodeData]));
|
|
226
226
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
@@ -241,7 +241,7 @@ export function getFetchDVM_MAINTAINER_QueryOptions(chainId: number | undefined,
|
|
|
241
241
|
* @param {string} __to - string
|
|
242
242
|
* @returns {string} __output0 - address
|
|
243
243
|
*/
|
|
244
|
-
export function fetchDVM_MT_FEE_RATE_MODEL_(chainId: number, __to: string) {
|
|
244
|
+
export function fetchDVM_MT_FEE_RATE_MODEL_(chainId: number, __to: string): Promise<string> {
|
|
245
245
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
246
246
|
const __data = hexlify(concat(['0xf6b06e70', __encodeData]));
|
|
247
247
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"contract IFeeRateModel","name":"","type":"address"}])
|
|
@@ -262,7 +262,7 @@ export function getFetchDVM_MT_FEE_RATE_MODEL_QueryOptions(chainId: number | und
|
|
|
262
262
|
* @param {string} __to - string
|
|
263
263
|
* @returns {bigint} __output0 - uint112
|
|
264
264
|
*/
|
|
265
|
-
export function fetchDVM_QUOTE_RESERVE_(chainId: number, __to: string) {
|
|
265
|
+
export function fetchDVM_QUOTE_RESERVE_(chainId: number, __to: string): Promise<bigint> {
|
|
266
266
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
267
267
|
const __data = hexlify(concat(['0xbbf5ce78', __encodeData]));
|
|
268
268
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint112","name":"","type":"uint112"}])
|
|
@@ -283,7 +283,7 @@ export function getFetchDVM_QUOTE_RESERVE_QueryOptions(chainId: number | undefin
|
|
|
283
283
|
* @param {string} __to - string
|
|
284
284
|
* @returns {string} __output0 - address
|
|
285
285
|
*/
|
|
286
|
-
export function fetchDVM_QUOTE_TOKEN_(chainId: number, __to: string) {
|
|
286
|
+
export function fetchDVM_QUOTE_TOKEN_(chainId: number, __to: string): Promise<string> {
|
|
287
287
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
288
288
|
const __data = hexlify(concat(['0xd4b97046', __encodeData]));
|
|
289
289
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"contract IERC20","name":"","type":"address"}])
|
|
@@ -305,7 +305,7 @@ export function getFetchDVM_QUOTE_TOKEN_QueryOptions(chainId: number | undefined
|
|
|
305
305
|
* @param {string} _addr - address
|
|
306
306
|
* @returns {string} __output0 - string
|
|
307
307
|
*/
|
|
308
|
-
export function fetchDVMAddressToShortString(chainId: number, __to: string, _addr: string) {
|
|
308
|
+
export function fetchDVMAddressToShortString(chainId: number, __to: string, _addr: string): Promise<string> {
|
|
309
309
|
const __encodeData = defaultAbiCoder.encode(["address"], [_addr]);
|
|
310
310
|
const __data = hexlify(concat(['0x17101940', __encodeData]));
|
|
311
311
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
@@ -328,7 +328,7 @@ export function getFetchDVMAddressToShortStringQueryOptions(chainId: number | un
|
|
|
328
328
|
* @param {string} spender - address
|
|
329
329
|
* @returns {bigint} __output0 - uint256
|
|
330
330
|
*/
|
|
331
|
-
export function fetchDVMAllowance(chainId: number, __to: string, owner: string, spender: string) {
|
|
331
|
+
export function fetchDVMAllowance(chainId: number, __to: string, owner: string, spender: string): Promise<bigint> {
|
|
332
332
|
const __encodeData = defaultAbiCoder.encode(["address","address"], [owner,spender]);
|
|
333
333
|
const __data = hexlify(concat(['0xdd62ed3e', __encodeData]));
|
|
334
334
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -350,7 +350,7 @@ export function getFetchDVMAllowanceQueryOptions(chainId: number | undefined, __
|
|
|
350
350
|
* @param {string} owner - address
|
|
351
351
|
* @returns {bigint} balance - uint256
|
|
352
352
|
*/
|
|
353
|
-
export function fetchDVMBalanceOf(chainId: number, __to: string, owner: string) {
|
|
353
|
+
export function fetchDVMBalanceOf(chainId: number, __to: string, owner: string): Promise<bigint> {
|
|
354
354
|
const __encodeData = defaultAbiCoder.encode(["address"], [owner]);
|
|
355
355
|
const __data = hexlify(concat(['0x70a08231', __encodeData]));
|
|
356
356
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"balance","type":"uint256"}])
|
|
@@ -371,7 +371,7 @@ export function getFetchDVMBalanceOfQueryOptions(chainId: number | undefined, __
|
|
|
371
371
|
* @param {string} __to - string
|
|
372
372
|
* @returns {bigint} __output0 - uint8
|
|
373
373
|
*/
|
|
374
|
-
export function fetchDVMDecimals(chainId: number, __to: string) {
|
|
374
|
+
export function fetchDVMDecimals(chainId: number, __to: string): Promise<bigint> {
|
|
375
375
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
376
376
|
const __data = hexlify(concat(['0x313ce567', __encodeData]));
|
|
377
377
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint8","name":"","type":"uint8"}])
|
|
@@ -392,7 +392,7 @@ export function getFetchDVMDecimalsQueryOptions(chainId: number | undefined, __t
|
|
|
392
392
|
* @param {string} __to - string
|
|
393
393
|
* @returns {bigint} input - uint256
|
|
394
394
|
*/
|
|
395
|
-
export function fetchDVMGetBaseInput(chainId: number, __to: string) {
|
|
395
|
+
export function fetchDVMGetBaseInput(chainId: number, __to: string): Promise<bigint> {
|
|
396
396
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
397
397
|
const __data = hexlify(concat(['0x65f6fcbb', __encodeData]));
|
|
398
398
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"input","type":"uint256"}])
|
|
@@ -413,7 +413,7 @@ export function getFetchDVMGetBaseInputQueryOptions(chainId: number | undefined,
|
|
|
413
413
|
* @param {string} __to - string
|
|
414
414
|
* @returns {bigint} midPrice - uint256
|
|
415
415
|
*/
|
|
416
|
-
export function fetchDVMGetMidPrice(chainId: number, __to: string) {
|
|
416
|
+
export function fetchDVMGetMidPrice(chainId: number, __to: string): Promise<bigint> {
|
|
417
417
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
418
418
|
const __data = hexlify(concat(['0xee27c689', __encodeData]));
|
|
419
419
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"midPrice","type":"uint256"}])
|
|
@@ -434,7 +434,7 @@ export function getFetchDVMGetMidPriceQueryOptions(chainId: number | undefined,
|
|
|
434
434
|
* @param {string} __to - string
|
|
435
435
|
* @returns {{i: bigint; K: bigint; B: bigint; Q: bigint; B0: bigint; Q0: bigint; R: bigint}} state - tuple
|
|
436
436
|
*/
|
|
437
|
-
export function fetchDVMGetPMMState(chainId: number, __to: string) {
|
|
437
|
+
export function fetchDVMGetPMMState(chainId: number, __to: string): Promise<{i: bigint; K: bigint; B: bigint; Q: bigint; B0: bigint; Q0: bigint; R: bigint}> {
|
|
438
438
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
439
439
|
const __data = hexlify(concat(['0xa382d1b9', __encodeData]));
|
|
440
440
|
return contractRequests.batchCall<{i: bigint; K: bigint; B: bigint; Q: bigint; B0: bigint; Q0: bigint; R: bigint}>(chainId, __to, __data, [{"components":[{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"uint256","name":"K","type":"uint256"},{"internalType":"uint256","name":"B","type":"uint256"},{"internalType":"uint256","name":"Q","type":"uint256"},{"internalType":"uint256","name":"B0","type":"uint256"},{"internalType":"uint256","name":"Q0","type":"uint256"},{"internalType":"enum PMMPricing.RState","name":"R","type":"uint8"}],"internalType":"struct PMMPricing.PMMState","name":"state","type":"tuple"}])
|
|
@@ -461,7 +461,15 @@ export function getFetchDVMGetPMMStateQueryOptions(chainId: number | undefined,
|
|
|
461
461
|
* @returns {bigint} Q0 - uint256
|
|
462
462
|
* @returns {bigint} R - uint256
|
|
463
463
|
*/
|
|
464
|
-
export function fetchDVMGetPMMStateForCall(chainId: number, __to: string) {
|
|
464
|
+
export function fetchDVMGetPMMStateForCall(chainId: number, __to: string): Promise<{
|
|
465
|
+
i: bigint;
|
|
466
|
+
K: bigint;
|
|
467
|
+
B: bigint;
|
|
468
|
+
Q: bigint;
|
|
469
|
+
B0: bigint;
|
|
470
|
+
Q0: bigint;
|
|
471
|
+
R: bigint;
|
|
472
|
+
}> {
|
|
465
473
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
466
474
|
const __data = hexlify(concat(['0xfd1ed7e9', __encodeData]));
|
|
467
475
|
return contractRequests.batchCall<{
|
|
@@ -490,7 +498,7 @@ export function getFetchDVMGetPMMStateForCallQueryOptions(chainId: number | unde
|
|
|
490
498
|
* @param {string} __to - string
|
|
491
499
|
* @returns {bigint} input - uint256
|
|
492
500
|
*/
|
|
493
|
-
export function fetchDVMGetQuoteInput(chainId: number, __to: string) {
|
|
501
|
+
export function fetchDVMGetQuoteInput(chainId: number, __to: string): Promise<bigint> {
|
|
494
502
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
495
503
|
const __data = hexlify(concat(['0x71f9100c', __encodeData]));
|
|
496
504
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"input","type":"uint256"}])
|
|
@@ -513,7 +521,10 @@ export function getFetchDVMGetQuoteInputQueryOptions(chainId: number | undefined
|
|
|
513
521
|
* @returns {bigint} lpFeeRate - uint256
|
|
514
522
|
* @returns {bigint} mtFeeRate - uint256
|
|
515
523
|
*/
|
|
516
|
-
export function fetchDVMGetUserFeeRate(chainId: number, __to: string, user: string) {
|
|
524
|
+
export function fetchDVMGetUserFeeRate(chainId: number, __to: string, user: string): Promise<{
|
|
525
|
+
lpFeeRate: bigint;
|
|
526
|
+
mtFeeRate: bigint;
|
|
527
|
+
}> {
|
|
517
528
|
const __encodeData = defaultAbiCoder.encode(["address"], [user]);
|
|
518
529
|
const __data = hexlify(concat(['0x44096609', __encodeData]));
|
|
519
530
|
return contractRequests.batchCall<{
|
|
@@ -538,7 +549,10 @@ export function getFetchDVMGetUserFeeRateQueryOptions(chainId: number | undefine
|
|
|
538
549
|
* @returns {bigint} baseReserve - uint256
|
|
539
550
|
* @returns {bigint} quoteReserve - uint256
|
|
540
551
|
*/
|
|
541
|
-
export function fetchDVMGetVaultReserve(chainId: number, __to: string) {
|
|
552
|
+
export function fetchDVMGetVaultReserve(chainId: number, __to: string): Promise<{
|
|
553
|
+
baseReserve: bigint;
|
|
554
|
+
quoteReserve: bigint;
|
|
555
|
+
}> {
|
|
542
556
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
543
557
|
const __data = hexlify(concat(['0x36223ce9', __encodeData]));
|
|
544
558
|
return contractRequests.batchCall<{
|
|
@@ -562,7 +576,7 @@ export function getFetchDVMGetVaultReserveQueryOptions(chainId: number | undefin
|
|
|
562
576
|
* @param {string} __to - string
|
|
563
577
|
* @returns {string} __output0 - string
|
|
564
578
|
*/
|
|
565
|
-
export function fetchDVMName(chainId: number, __to: string) {
|
|
579
|
+
export function fetchDVMName(chainId: number, __to: string): Promise<string> {
|
|
566
580
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
567
581
|
const __data = hexlify(concat(['0x06fdde03', __encodeData]));
|
|
568
582
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
@@ -584,7 +598,7 @@ export function getFetchDVMNameQueryOptions(chainId: number | undefined, __to: s
|
|
|
584
598
|
* @param {string} __input1 - address
|
|
585
599
|
* @returns {bigint} __output0 - uint256
|
|
586
600
|
*/
|
|
587
|
-
export function fetchDVMNonces(chainId: number, __to: string, __input1: string) {
|
|
601
|
+
export function fetchDVMNonces(chainId: number, __to: string, __input1: string): Promise<bigint> {
|
|
588
602
|
const __encodeData = defaultAbiCoder.encode(["address"], [__input1]);
|
|
589
603
|
const __data = hexlify(concat(['0x7ecebe00', __encodeData]));
|
|
590
604
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -608,7 +622,10 @@ export function getFetchDVMNoncesQueryOptions(chainId: number | undefined, __to:
|
|
|
608
622
|
* @returns {bigint} receiveQuoteAmount - uint256
|
|
609
623
|
* @returns {bigint} mtFee - uint256
|
|
610
624
|
*/
|
|
611
|
-
export function fetchDVMQuerySellBase(chainId: number, __to: string, trader: string, payBaseAmount: number) {
|
|
625
|
+
export function fetchDVMQuerySellBase(chainId: number, __to: string, trader: string, payBaseAmount: number): Promise<{
|
|
626
|
+
receiveQuoteAmount: bigint;
|
|
627
|
+
mtFee: bigint;
|
|
628
|
+
}> {
|
|
612
629
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [trader,payBaseAmount]);
|
|
613
630
|
const __data = hexlify(concat(['0x79a04876', __encodeData]));
|
|
614
631
|
return contractRequests.batchCall<{
|
|
@@ -635,7 +652,10 @@ export function getFetchDVMQuerySellBaseQueryOptions(chainId: number | undefined
|
|
|
635
652
|
* @returns {bigint} receiveBaseAmount - uint256
|
|
636
653
|
* @returns {bigint} mtFee - uint256
|
|
637
654
|
*/
|
|
638
|
-
export function fetchDVMQuerySellQuote(chainId: number, __to: string, trader: string, payQuoteAmount: number) {
|
|
655
|
+
export function fetchDVMQuerySellQuote(chainId: number, __to: string, trader: string, payQuoteAmount: number): Promise<{
|
|
656
|
+
receiveBaseAmount: bigint;
|
|
657
|
+
mtFee: bigint;
|
|
658
|
+
}> {
|
|
639
659
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [trader,payQuoteAmount]);
|
|
640
660
|
const __data = hexlify(concat(['0x66410a21', __encodeData]));
|
|
641
661
|
return contractRequests.batchCall<{
|
|
@@ -659,7 +679,7 @@ export function getFetchDVMQuerySellQuoteQueryOptions(chainId: number | undefine
|
|
|
659
679
|
* @param {string} __to - string
|
|
660
680
|
* @returns {string} __output0 - string
|
|
661
681
|
*/
|
|
662
|
-
export function fetchDVMSymbol(chainId: number, __to: string) {
|
|
682
|
+
export function fetchDVMSymbol(chainId: number, __to: string): Promise<string> {
|
|
663
683
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
664
684
|
const __data = hexlify(concat(['0x95d89b41', __encodeData]));
|
|
665
685
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
@@ -680,7 +700,7 @@ export function getFetchDVMSymbolQueryOptions(chainId: number | undefined, __to:
|
|
|
680
700
|
* @param {string} __to - string
|
|
681
701
|
* @returns {bigint} __output0 - uint256
|
|
682
702
|
*/
|
|
683
|
-
export function fetchDVMTotalSupply(chainId: number, __to: string) {
|
|
703
|
+
export function fetchDVMTotalSupply(chainId: number, __to: string): Promise<bigint> {
|
|
684
704
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
685
705
|
const __data = hexlify(concat(['0x18160ddd', __encodeData]));
|
|
686
706
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -701,7 +721,7 @@ export function getFetchDVMTotalSupplyQueryOptions(chainId: number | undefined,
|
|
|
701
721
|
* @param {string} __to - string
|
|
702
722
|
* @returns {string} __output0 - string
|
|
703
723
|
*/
|
|
704
|
-
export function fetchDVMVersion(chainId: number, __to: string) {
|
|
724
|
+
export function fetchDVMVersion(chainId: number, __to: string): Promise<string> {
|
|
705
725
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
706
726
|
const __data = hexlify(concat(['0x54fd4d50', __encodeData]));
|
|
707
727
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
@@ -14,7 +14,7 @@ export function getDVMFactoryContractAddressByChainId(chainId: number) {
|
|
|
14
14
|
* @param {number} chainId - number
|
|
15
15
|
* @returns {string} __output0 - address
|
|
16
16
|
*/
|
|
17
|
-
export function fetchDVMFactory_CLONE_FACTORY_(chainId: number) {
|
|
17
|
+
export function fetchDVMFactory_CLONE_FACTORY_(chainId: number): Promise<string> {
|
|
18
18
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
19
19
|
|
|
20
20
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
@@ -36,7 +36,7 @@ export function getFetchDVMFactory_CLONE_FACTORY_QueryOptions(chainId: number |
|
|
|
36
36
|
* @param {number} chainId - number
|
|
37
37
|
* @returns {string} __output0 - address
|
|
38
38
|
*/
|
|
39
|
-
export function fetchDVMFactory_DEFAULT_MAINTAINER_(chainId: number) {
|
|
39
|
+
export function fetchDVMFactory_DEFAULT_MAINTAINER_(chainId: number): Promise<string> {
|
|
40
40
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
41
41
|
|
|
42
42
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
@@ -58,7 +58,7 @@ export function getFetchDVMFactory_DEFAULT_MAINTAINER_QueryOptions(chainId: numb
|
|
|
58
58
|
* @param {number} chainId - number
|
|
59
59
|
* @returns {string} __output0 - address
|
|
60
60
|
*/
|
|
61
|
-
export function fetchDVMFactory_DEFAULT_MT_FEE_RATE_MODEL_(chainId: number) {
|
|
61
|
+
export function fetchDVMFactory_DEFAULT_MT_FEE_RATE_MODEL_(chainId: number): Promise<string> {
|
|
62
62
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
63
63
|
|
|
64
64
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
@@ -80,7 +80,7 @@ export function getFetchDVMFactory_DEFAULT_MT_FEE_RATE_MODEL_QueryOptions(chainI
|
|
|
80
80
|
* @param {number} chainId - number
|
|
81
81
|
* @returns {string} __output0 - address
|
|
82
82
|
*/
|
|
83
|
-
export function fetchDVMFactory_DVM_TEMPLATE_(chainId: number) {
|
|
83
|
+
export function fetchDVMFactory_DVM_TEMPLATE_(chainId: number): Promise<string> {
|
|
84
84
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
85
85
|
|
|
86
86
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
@@ -102,7 +102,7 @@ export function getFetchDVMFactory_DVM_TEMPLATE_QueryOptions(chainId: number | u
|
|
|
102
102
|
* @param {number} chainId - number
|
|
103
103
|
* @returns {string} __output0 - address
|
|
104
104
|
*/
|
|
105
|
-
export function fetchDVMFactory_NEW_OWNER_(chainId: number) {
|
|
105
|
+
export function fetchDVMFactory_NEW_OWNER_(chainId: number): Promise<string> {
|
|
106
106
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
107
107
|
|
|
108
108
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
@@ -124,7 +124,7 @@ export function getFetchDVMFactory_NEW_OWNER_QueryOptions(chainId: number | unde
|
|
|
124
124
|
* @param {number} chainId - number
|
|
125
125
|
* @returns {string} __output0 - address
|
|
126
126
|
*/
|
|
127
|
-
export function fetchDVMFactory_OWNER_(chainId: number) {
|
|
127
|
+
export function fetchDVMFactory_OWNER_(chainId: number): Promise<string> {
|
|
128
128
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
129
129
|
|
|
130
130
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
@@ -149,7 +149,7 @@ export function getFetchDVMFactory_OWNER_QueryOptions(chainId: number | undefine
|
|
|
149
149
|
* @param {number} __input3 - uint256
|
|
150
150
|
* @returns {string} __output0 - address
|
|
151
151
|
*/
|
|
152
|
-
export function fetchDVMFactory_REGISTRY_(chainId: number, __input1: string, __input2: string, __input3: number) {
|
|
152
|
+
export function fetchDVMFactory_REGISTRY_(chainId: number, __input1: string, __input2: string, __input3: number): Promise<string> {
|
|
153
153
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
154
154
|
|
|
155
155
|
const __encodeData = defaultAbiCoder.encode(["address","address","uint256"], [__input1,__input2,__input3]);
|
|
@@ -173,7 +173,7 @@ export function getFetchDVMFactory_REGISTRY_QueryOptions(chainId: number | undef
|
|
|
173
173
|
* @param {number} __input2 - uint256
|
|
174
174
|
* @returns {string} __output0 - address
|
|
175
175
|
*/
|
|
176
|
-
export function fetchDVMFactory_USER_REGISTRY_(chainId: number, __input1: string, __input2: number) {
|
|
176
|
+
export function fetchDVMFactory_USER_REGISTRY_(chainId: number, __input1: string, __input2: number): Promise<string> {
|
|
177
177
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
178
178
|
|
|
179
179
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [__input1,__input2]);
|
|
@@ -197,7 +197,7 @@ export function getFetchDVMFactory_USER_REGISTRY_QueryOptions(chainId: number |
|
|
|
197
197
|
* @param {string} quoteToken - address
|
|
198
198
|
* @returns {Array<string>} machines - address[]
|
|
199
199
|
*/
|
|
200
|
-
export function fetchDVMFactoryGetDODOPool(chainId: number, baseToken: string, quoteToken: string) {
|
|
200
|
+
export function fetchDVMFactoryGetDODOPool(chainId: number, baseToken: string, quoteToken: string): Promise<Array<string>> {
|
|
201
201
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
202
202
|
|
|
203
203
|
const __encodeData = defaultAbiCoder.encode(["address","address"], [baseToken,quoteToken]);
|
|
@@ -222,7 +222,10 @@ export function getFetchDVMFactoryGetDODOPoolQueryOptions(chainId: number | unde
|
|
|
222
222
|
* @returns {Array<string>} baseToken0Machines - address[]
|
|
223
223
|
* @returns {Array<string>} baseToken1Machines - address[]
|
|
224
224
|
*/
|
|
225
|
-
export function fetchDVMFactoryGetDODOPoolBidirection(chainId: number, token0: string, token1: string) {
|
|
225
|
+
export function fetchDVMFactoryGetDODOPoolBidirection(chainId: number, token0: string, token1: string): Promise<{
|
|
226
|
+
baseToken0Machines: Array<string>;
|
|
227
|
+
baseToken1Machines: Array<string>;
|
|
228
|
+
}> {
|
|
226
229
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
227
230
|
|
|
228
231
|
const __encodeData = defaultAbiCoder.encode(["address","address"], [token0,token1]);
|
|
@@ -248,7 +251,7 @@ export function getFetchDVMFactoryGetDODOPoolBidirectionQueryOptions(chainId: nu
|
|
|
248
251
|
* @param {string} user - address
|
|
249
252
|
* @returns {Array<string>} machines - address[]
|
|
250
253
|
*/
|
|
251
|
-
export function fetchDVMFactoryGetDODOPoolByUser(chainId: number, user: string) {
|
|
254
|
+
export function fetchDVMFactoryGetDODOPoolByUser(chainId: number, user: string): Promise<Array<string>> {
|
|
252
255
|
const __to = getDVMFactoryContractAddressByChainId(chainId);
|
|
253
256
|
|
|
254
257
|
const __encodeData = defaultAbiCoder.encode(["address"], [user]);
|
package/src/contract/ERC20.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { contractRequests } from '../contractRequests';
|
|
|
10
10
|
* @param {string} __to - string
|
|
11
11
|
* @returns {string} __output0 - string
|
|
12
12
|
*/
|
|
13
|
-
export function fetchERC20Name(chainId: number, __to: string) {
|
|
13
|
+
export function fetchERC20Name(chainId: number, __to: string): Promise<string> {
|
|
14
14
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
15
15
|
const __data = hexlify(concat(['0x06fdde03', __encodeData]));
|
|
16
16
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"name":"","type":"string"}])
|
|
@@ -31,7 +31,7 @@ export function getFetchERC20NameQueryOptions(chainId: number | undefined, __to:
|
|
|
31
31
|
* @param {string} __to - string
|
|
32
32
|
* @returns {bigint} __output0 - uint256
|
|
33
33
|
*/
|
|
34
|
-
export function fetchERC20TotalSupply(chainId: number, __to: string) {
|
|
34
|
+
export function fetchERC20TotalSupply(chainId: number, __to: string): Promise<bigint> {
|
|
35
35
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
36
36
|
const __data = hexlify(concat(['0x18160ddd', __encodeData]));
|
|
37
37
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"name":"","type":"uint256"}])
|
|
@@ -52,7 +52,7 @@ export function getFetchERC20TotalSupplyQueryOptions(chainId: number | undefined
|
|
|
52
52
|
* @param {string} __to - string
|
|
53
53
|
* @returns {bigint} __output0 - uint8
|
|
54
54
|
*/
|
|
55
|
-
export function fetchERC20Decimals(chainId: number, __to: string) {
|
|
55
|
+
export function fetchERC20Decimals(chainId: number, __to: string): Promise<bigint> {
|
|
56
56
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
57
57
|
const __data = hexlify(concat(['0x313ce567', __encodeData]));
|
|
58
58
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"name":"","type":"uint8"}])
|
|
@@ -74,7 +74,7 @@ export function getFetchERC20DecimalsQueryOptions(chainId: number | undefined, _
|
|
|
74
74
|
* @param {string} __input1 - address
|
|
75
75
|
* @returns {bigint} __output0 - uint256
|
|
76
76
|
*/
|
|
77
|
-
export function fetchERC20BalanceOf(chainId: number, __to: string, __input1: string) {
|
|
77
|
+
export function fetchERC20BalanceOf(chainId: number, __to: string, __input1: string): Promise<bigint> {
|
|
78
78
|
const __encodeData = defaultAbiCoder.encode(["address"], [__input1]);
|
|
79
79
|
const __data = hexlify(concat(['0x70a08231', __encodeData]));
|
|
80
80
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"name":"","type":"uint256"}])
|
|
@@ -95,7 +95,7 @@ export function getFetchERC20BalanceOfQueryOptions(chainId: number | undefined,
|
|
|
95
95
|
* @param {string} __to - string
|
|
96
96
|
* @returns {string} __output0 - string
|
|
97
97
|
*/
|
|
98
|
-
export function fetchERC20Symbol(chainId: number, __to: string) {
|
|
98
|
+
export function fetchERC20Symbol(chainId: number, __to: string): Promise<string> {
|
|
99
99
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
100
100
|
const __data = hexlify(concat(['0x95d89b41', __encodeData]));
|
|
101
101
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"name":"","type":"string"}])
|
|
@@ -118,7 +118,7 @@ export function getFetchERC20SymbolQueryOptions(chainId: number | undefined, __t
|
|
|
118
118
|
* @param {string} __input2 - address
|
|
119
119
|
* @returns {bigint} __output0 - uint256
|
|
120
120
|
*/
|
|
121
|
-
export function fetchERC20Allowance(chainId: number, __to: string, __input1: string, __input2: string) {
|
|
121
|
+
export function fetchERC20Allowance(chainId: number, __to: string, __input1: string, __input2: string): Promise<bigint> {
|
|
122
122
|
const __encodeData = defaultAbiCoder.encode(["address","address"], [__input1,__input2]);
|
|
123
123
|
const __data = hexlify(concat(['0xdd62ed3e', __encodeData]));
|
|
124
124
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"name":"","type":"uint256"}])
|
|
@@ -15,7 +15,7 @@ export function getERC20HelperContractAddressByChainId(chainId: number) {
|
|
|
15
15
|
* @param {string} _bytes - bytes32
|
|
16
16
|
* @returns {string} _string - string
|
|
17
17
|
*/
|
|
18
|
-
export function fetchERC20HelperBytes32ToString(chainId: number, _bytes: string) {
|
|
18
|
+
export function fetchERC20HelperBytes32ToString(chainId: number, _bytes: string): Promise<string> {
|
|
19
19
|
const __to = getERC20HelperContractAddressByChainId(chainId);
|
|
20
20
|
|
|
21
21
|
const __encodeData = defaultAbiCoder.encode(["bytes32"], [_bytes]);
|
|
@@ -45,7 +45,14 @@ export function getFetchERC20HelperBytes32ToStringQueryOptions(chainId: number |
|
|
|
45
45
|
* @returns {bigint} balance - uint256
|
|
46
46
|
* @returns {bigint} allownance - uint256
|
|
47
47
|
*/
|
|
48
|
-
export function fetchERC20HelperIsERC20(chainId: number, token: string, user: string, spender: string) {
|
|
48
|
+
export function fetchERC20HelperIsERC20(chainId: number, token: string, user: string, spender: string): Promise<{
|
|
49
|
+
isOk: boolean;
|
|
50
|
+
symbol: string;
|
|
51
|
+
name: string;
|
|
52
|
+
decimals: bigint;
|
|
53
|
+
balance: bigint;
|
|
54
|
+
allownance: bigint;
|
|
55
|
+
}> {
|
|
49
56
|
const __to = getERC20HelperContractAddressByChainId(chainId);
|
|
50
57
|
|
|
51
58
|
const __encodeData = defaultAbiCoder.encode(["address","address","address"], [token,user,spender]);
|
|
@@ -81,7 +88,13 @@ export function getFetchERC20HelperIsERC20QueryOptions(chainId: number | undefin
|
|
|
81
88
|
* @returns {bigint} balance - uint256
|
|
82
89
|
* @returns {bigint} allownance - uint256
|
|
83
90
|
*/
|
|
84
|
-
export function fetchERC20HelperJudgeERC20(chainId: number, token: string, user: string, spender: string) {
|
|
91
|
+
export function fetchERC20HelperJudgeERC20(chainId: number, token: string, user: string, spender: string): Promise<{
|
|
92
|
+
symbol: string;
|
|
93
|
+
name: string;
|
|
94
|
+
decimals: bigint;
|
|
95
|
+
balance: bigint;
|
|
96
|
+
allownance: bigint;
|
|
97
|
+
}> {
|
|
85
98
|
const __to = getERC20HelperContractAddressByChainId(chainId);
|
|
86
99
|
|
|
87
100
|
const __encodeData = defaultAbiCoder.encode(["address","address","address"], [token,user,spender]);
|
|
@@ -116,7 +129,13 @@ export function getFetchERC20HelperJudgeERC20QueryOptions(chainId: number | unde
|
|
|
116
129
|
* @returns {bigint} balance - uint256
|
|
117
130
|
* @returns {bigint} allownance - uint256
|
|
118
131
|
*/
|
|
119
|
-
export function fetchERC20HelperJudgeOldERC20(chainId: number, token: string, user: string, spender: string) {
|
|
132
|
+
export function fetchERC20HelperJudgeOldERC20(chainId: number, token: string, user: string, spender: string): Promise<{
|
|
133
|
+
symbol: string;
|
|
134
|
+
name: string;
|
|
135
|
+
decimals: bigint;
|
|
136
|
+
balance: bigint;
|
|
137
|
+
allownance: bigint;
|
|
138
|
+
}> {
|
|
120
139
|
const __to = getERC20HelperContractAddressByChainId(chainId);
|
|
121
140
|
|
|
122
141
|
const __encodeData = defaultAbiCoder.encode(["address","address","address"], [token,user,spender]);
|
|
@@ -10,7 +10,7 @@ import { contractRequests } from '../contractRequests';
|
|
|
10
10
|
* @param {string} __to - string
|
|
11
11
|
* @returns {string} __output0 - address
|
|
12
12
|
*/
|
|
13
|
-
export function fetchERC20MineV3_NEW_OWNER_(chainId: number, __to: string) {
|
|
13
|
+
export function fetchERC20MineV3_NEW_OWNER_(chainId: number, __to: string): Promise<string> {
|
|
14
14
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
15
15
|
const __data = hexlify(concat(['0x8456db15', __encodeData]));
|
|
16
16
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
@@ -31,7 +31,7 @@ export function getFetchERC20MineV3_NEW_OWNER_QueryOptions(chainId: number | und
|
|
|
31
31
|
* @param {string} __to - string
|
|
32
32
|
* @returns {string} __output0 - address
|
|
33
33
|
*/
|
|
34
|
-
export function fetchERC20MineV3_OWNER_(chainId: number, __to: string) {
|
|
34
|
+
export function fetchERC20MineV3_OWNER_(chainId: number, __to: string): Promise<string> {
|
|
35
35
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
36
36
|
const __data = hexlify(concat(['0x16048bc4', __encodeData]));
|
|
37
37
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
@@ -52,7 +52,7 @@ export function getFetchERC20MineV3_OWNER_QueryOptions(chainId: number | undefin
|
|
|
52
52
|
* @param {string} __to - string
|
|
53
53
|
* @returns {string} __output0 - address
|
|
54
54
|
*/
|
|
55
|
-
export function fetchERC20MineV3_TOKEN_(chainId: number, __to: string) {
|
|
55
|
+
export function fetchERC20MineV3_TOKEN_(chainId: number, __to: string): Promise<string> {
|
|
56
56
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
57
57
|
const __data = hexlify(concat(['0x92e3200b', __encodeData]));
|
|
58
58
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
@@ -74,7 +74,7 @@ export function getFetchERC20MineV3_TOKEN_QueryOptions(chainId: number | undefin
|
|
|
74
74
|
* @param {string} user - address
|
|
75
75
|
* @returns {bigint} __output0 - uint256
|
|
76
76
|
*/
|
|
77
|
-
export function fetchERC20MineV3BalanceOf(chainId: number, __to: string, user: string) {
|
|
77
|
+
export function fetchERC20MineV3BalanceOf(chainId: number, __to: string, user: string): Promise<bigint> {
|
|
78
78
|
const __encodeData = defaultAbiCoder.encode(["address"], [user]);
|
|
79
79
|
const __data = hexlify(concat(['0x70a08231', __encodeData]));
|
|
80
80
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -96,7 +96,7 @@ export function getFetchERC20MineV3BalanceOfQueryOptions(chainId: number | undef
|
|
|
96
96
|
* @param {string} rewardToken - address
|
|
97
97
|
* @returns {bigint} __output0 - uint256
|
|
98
98
|
*/
|
|
99
|
-
export function fetchERC20MineV3GetIdByRewardToken(chainId: number, __to: string, rewardToken: string) {
|
|
99
|
+
export function fetchERC20MineV3GetIdByRewardToken(chainId: number, __to: string, rewardToken: string): Promise<bigint> {
|
|
100
100
|
const __encodeData = defaultAbiCoder.encode(["address"], [rewardToken]);
|
|
101
101
|
const __data = hexlify(concat(['0xa2a54bee', __encodeData]));
|
|
102
102
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -119,7 +119,7 @@ export function getFetchERC20MineV3GetIdByRewardTokenQueryOptions(chainId: numbe
|
|
|
119
119
|
* @param {number} i - uint256
|
|
120
120
|
* @returns {bigint} __output0 - uint256
|
|
121
121
|
*/
|
|
122
|
-
export function fetchERC20MineV3GetPendingReward(chainId: number, __to: string, user: string, i: number) {
|
|
122
|
+
export function fetchERC20MineV3GetPendingReward(chainId: number, __to: string, user: string, i: number): Promise<bigint> {
|
|
123
123
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [user,i]);
|
|
124
124
|
const __data = hexlify(concat(['0x999ffd97', __encodeData]));
|
|
125
125
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -142,7 +142,7 @@ export function getFetchERC20MineV3GetPendingRewardQueryOptions(chainId: number
|
|
|
142
142
|
* @param {string} rewardToken - address
|
|
143
143
|
* @returns {bigint} __output0 - uint256
|
|
144
144
|
*/
|
|
145
|
-
export function fetchERC20MineV3GetPendingRewardByToken(chainId: number, __to: string, user: string, rewardToken: string) {
|
|
145
|
+
export function fetchERC20MineV3GetPendingRewardByToken(chainId: number, __to: string, user: string, rewardToken: string): Promise<bigint> {
|
|
146
146
|
const __encodeData = defaultAbiCoder.encode(["address","address"], [user,rewardToken]);
|
|
147
147
|
const __data = hexlify(concat(['0x00b68f08', __encodeData]));
|
|
148
148
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -163,7 +163,7 @@ export function getFetchERC20MineV3GetPendingRewardByTokenQueryOptions(chainId:
|
|
|
163
163
|
* @param {string} __to - string
|
|
164
164
|
* @returns {bigint} __output0 - uint256
|
|
165
165
|
*/
|
|
166
|
-
export function fetchERC20MineV3GetRewardNum(chainId: number, __to: string) {
|
|
166
|
+
export function fetchERC20MineV3GetRewardNum(chainId: number, __to: string): Promise<bigint> {
|
|
167
167
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
168
168
|
const __data = hexlify(concat(['0x5ae9a549', __encodeData]));
|
|
169
169
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -185,7 +185,7 @@ export function getFetchERC20MineV3GetRewardNumQueryOptions(chainId: number | un
|
|
|
185
185
|
* @param {number} i - uint256
|
|
186
186
|
* @returns {string} __output0 - address
|
|
187
187
|
*/
|
|
188
|
-
export function fetchERC20MineV3GetRewardTokenById(chainId: number, __to: string, i: number) {
|
|
188
|
+
export function fetchERC20MineV3GetRewardTokenById(chainId: number, __to: string, i: number): Promise<string> {
|
|
189
189
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [i]);
|
|
190
190
|
const __data = hexlify(concat(['0x697d86a2', __encodeData]));
|
|
191
191
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
@@ -207,7 +207,7 @@ export function getFetchERC20MineV3GetRewardTokenByIdQueryOptions(chainId: numbe
|
|
|
207
207
|
* @param {string} rewardToken - address
|
|
208
208
|
* @returns {string} __output0 - address
|
|
209
209
|
*/
|
|
210
|
-
export function fetchERC20MineV3GetVaultByRewardToken(chainId: number, __to: string, rewardToken: string) {
|
|
210
|
+
export function fetchERC20MineV3GetVaultByRewardToken(chainId: number, __to: string, rewardToken: string): Promise<string> {
|
|
211
211
|
const __encodeData = defaultAbiCoder.encode(["address"], [rewardToken]);
|
|
212
212
|
const __data = hexlify(concat(['0xe513eb15', __encodeData]));
|
|
213
213
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
@@ -229,7 +229,7 @@ export function getFetchERC20MineV3GetVaultByRewardTokenQueryOptions(chainId: nu
|
|
|
229
229
|
* @param {string} rewardToken - address
|
|
230
230
|
* @returns {bigint} __output0 - uint256
|
|
231
231
|
*/
|
|
232
|
-
export function fetchERC20MineV3GetVaultDebtByRewardToken(chainId: number, __to: string, rewardToken: string) {
|
|
232
|
+
export function fetchERC20MineV3GetVaultDebtByRewardToken(chainId: number, __to: string, rewardToken: string): Promise<bigint> {
|
|
233
233
|
const __encodeData = defaultAbiCoder.encode(["address"], [rewardToken]);
|
|
234
234
|
const __data = hexlify(concat(['0xbdbf2657', __encodeData]));
|
|
235
235
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
@@ -259,7 +259,17 @@ export function getFetchERC20MineV3GetVaultDebtByRewardTokenQueryOptions(chainId
|
|
|
259
259
|
* @returns {bigint} workThroughReward - uint256
|
|
260
260
|
* @returns {bigint} lastFlagBlock - uint256
|
|
261
261
|
*/
|
|
262
|
-
export function fetchERC20MineV3RewardTokenInfos(chainId: number, __to: string, __input1: number) {
|
|
262
|
+
export function fetchERC20MineV3RewardTokenInfos(chainId: number, __to: string, __input1: number): Promise<{
|
|
263
|
+
rewardToken: string;
|
|
264
|
+
startBlock: bigint;
|
|
265
|
+
endBlock: bigint;
|
|
266
|
+
rewardVault: string;
|
|
267
|
+
rewardPerBlock: bigint;
|
|
268
|
+
accRewardPerShare: bigint;
|
|
269
|
+
lastRewardBlock: bigint;
|
|
270
|
+
workThroughReward: bigint;
|
|
271
|
+
lastFlagBlock: bigint;
|
|
272
|
+
}> {
|
|
263
273
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [__input1]);
|
|
264
274
|
const __data = hexlify(concat(['0x1c00a0de', __encodeData]));
|
|
265
275
|
return contractRequests.batchCall<{
|
|
@@ -290,7 +300,7 @@ export function getFetchERC20MineV3RewardTokenInfosQueryOptions(chainId: number
|
|
|
290
300
|
* @param {string} __to - string
|
|
291
301
|
* @returns {bigint} __output0 - uint256
|
|
292
302
|
*/
|
|
293
|
-
export function fetchERC20MineV3TotalSupply(chainId: number, __to: string) {
|
|
303
|
+
export function fetchERC20MineV3TotalSupply(chainId: number, __to: string): Promise<bigint> {
|
|
294
304
|
const __encodeData = defaultAbiCoder.encode([], []);
|
|
295
305
|
const __data = hexlify(concat(['0x18160ddd', __encodeData]));
|
|
296
306
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|