@dodoex/dodo-contract-request 1.5.0 → 1.6.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.releaserc.json +8 -3
- package/CHANGELOG.md +15 -25
- package/contract-config/sepolia.json +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/types/contract/BuyoutModel.d.ts +42 -12
- package/dist/types/contract/CP.d.ts +214 -50
- package/dist/types/contract/CloneFactory.d.ts +1 -1
- package/dist/types/contract/CrowdPoolingFactory.d.ts +126 -34
- package/dist/types/contract/CustomERC20.d.ts +75 -20
- package/dist/types/contract/CustomMintableERC20.d.ts +77 -22
- package/dist/types/contract/D3Proxy.d.ts +33 -13
- package/dist/types/contract/D3Vault.d.ts +324 -123
- package/dist/types/contract/DODOApprove.d.ts +44 -14
- package/dist/types/contract/DODOApproveProxy.d.ts +51 -16
- package/dist/types/contract/DODOCalleeHelper.d.ts +10 -5
- package/dist/types/contract/DODOCirculationHelper.d.ts +47 -12
- package/dist/types/contract/DODOCpProxy.d.ts +20 -5
- package/dist/types/contract/DODOCpProxyWithoutGlobalQuota.d.ts +20 -5
- package/dist/types/contract/DODODppProxy.d.ts +20 -5
- package/dist/types/contract/DODODspProxy.d.ts +27 -7
- package/dist/types/contract/DODODspProxyWithoutGSP.d.ts +20 -5
- package/dist/types/contract/DODOIncentive.d.ts +75 -26
- package/dist/types/contract/DODOMineV2Factory.d.ts +50 -15
- package/dist/types/contract/DODOMineV3Proxy.d.ts +43 -13
- package/dist/types/contract/DODOMineV3ProxyWithoutPlatform.d.ts +43 -13
- package/dist/types/contract/DODOMineV3Registry.d.ts +43 -13
- package/dist/types/contract/DODONFT.d.ts +95 -25
- package/dist/types/contract/DODONFT1155.d.ts +56 -16
- package/dist/types/contract/DODONFTApprove.d.ts +47 -17
- package/dist/types/contract/DODONFTPoolProxy.d.ts +74 -24
- package/dist/types/contract/DODONFTProxy.d.ts +84 -24
- package/dist/types/contract/DODONFTRegistry.d.ts +49 -17
- package/dist/types/contract/DODONFTRouteHelper.d.ts +12 -2
- package/dist/types/contract/DODOSellHelper.d.ts +12 -2
- package/dist/types/contract/DODOStarterProxy.d.ts +13 -3
- package/dist/types/contract/DODOV1.d.ts +269 -77
- package/dist/types/contract/DODOV1Adapter.d.ts +8 -3
- package/dist/types/contract/DODOV1PmmHelper.d.ts +6 -1
- package/dist/types/contract/DODOV1Proxy.d.ts +13 -8
- package/dist/types/contract/DODOV2Proxy02.d.ts +97 -32
- package/dist/types/contract/DODOV2RouteHelper.d.ts +24 -4
- package/dist/types/contract/DPPAdvanced.d.ts +172 -69
- package/dist/types/contract/DPPAdvancedAdmin.d.ts +51 -16
- package/dist/types/contract/DPPFactory.d.ts +97 -30
- package/dist/types/contract/DSP.d.ts +221 -78
- package/dist/types/contract/DSPFactory.d.ts +73 -21
- package/dist/types/contract/DVM.d.ts +203 -71
- package/dist/types/contract/DVMFactory.d.ts +73 -21
- package/dist/types/contract/ERC20.d.ts +41 -11
- package/dist/types/contract/ERC20Helper.d.ts +24 -23
- package/dist/types/contract/ERC20MineV3.d.ts +91 -36
- package/dist/types/contract/ERC20V3Factory.d.ts +77 -26
- package/dist/types/contract/FeeRateDIP3Impl.d.ts +71 -30
- package/dist/types/contract/FeeRateModel.d.ts +28 -8
- package/dist/types/contract/GSP.d.ts +265 -95
- package/dist/types/contract/GSPFactory.d.ts +68 -21
- package/dist/types/contract/InitializableERC20.d.ts +46 -11
- package/dist/types/contract/LimitOrder.d.ts +71 -21
- package/dist/types/contract/LimitOrderBot.d.ts +45 -15
- package/dist/types/contract/MulticallWithValid.d.ts +43 -8
- package/dist/types/contract/PermissionManager.d.ts +33 -13
- package/dist/types/contract/UniswapV2Factory.d.ts +34 -9
- package/dist/types/contract/UniswapV2Pair.d.ts +126 -35
- package/dist/types/contract/UniswapV2Router02.d.ts +59 -24
- package/dist/types/contract/dodoTeam.d.ts +100 -33
- package/dist/types/contract/vDODOToken.d.ts +196 -58
- package/dist/types/contractRequests.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/scripts/contract-generate.ts +8 -1
- package/src/config/sepolia.ts +1 -1
- package/src/contract/BuyoutModel.ts +60 -0
- package/src/contract/CP.ts +340 -0
- package/src/contract/CrowdPoolingFactory.ts +190 -0
- package/src/contract/CustomERC20.ts +110 -0
- package/src/contract/CustomMintableERC20.ts +110 -0
- package/src/contract/D3Proxy.ts +40 -0
- package/src/contract/D3Vault.ts +480 -0
- package/src/contract/DODOApprove.ts +60 -0
- package/src/contract/DODOApproveProxy.ts +70 -0
- package/src/contract/DODOCalleeHelper.ts +10 -0
- package/src/contract/DODOCirculationHelper.ts +70 -0
- package/src/contract/DODOCpProxy.ts +30 -0
- package/src/contract/DODOCpProxyWithoutGlobalQuota.ts +30 -0
- package/src/contract/DODODppProxy.ts +30 -0
- package/src/contract/DODODspProxy.ts +40 -0
- package/src/contract/DODODspProxyWithoutGSP.ts +30 -0
- package/src/contract/DODOIncentive.ts +110 -0
- package/src/contract/DODOMineV2Factory.ts +70 -0
- package/src/contract/DODOMineV3Proxy.ts +60 -0
- package/src/contract/DODOMineV3ProxyWithoutPlatform.ts +60 -0
- package/src/contract/DODOMineV3Registry.ts +60 -0
- package/src/contract/DODONFT.ts +140 -0
- package/src/contract/DODONFT1155.ts +80 -0
- package/src/contract/DODONFTApprove.ts +60 -0
- package/src/contract/DODONFTPoolProxy.ts +100 -0
- package/src/contract/DODONFTProxy.ts +120 -0
- package/src/contract/DODONFTRegistry.ts +70 -0
- package/src/contract/DODONFTRouteHelper.ts +20 -0
- package/src/contract/DODOSellHelper.ts +20 -0
- package/src/contract/DODOStarterProxy.ts +20 -0
- package/src/contract/DODOV1.ts +390 -0
- package/src/contract/DODOV1Adapter.ts +10 -0
- package/src/contract/DODOV1PmmHelper.ts +10 -0
- package/src/contract/DODOV1Proxy.ts +10 -0
- package/src/contract/DODOV2Proxy02.ts +130 -0
- package/src/contract/DODOV2RouteHelper.ts +40 -0
- package/src/contract/DPPAdvanced.ts +270 -0
- package/src/contract/DPPAdvancedAdmin.ts +70 -0
- package/src/contract/DPPFactory.ts +140 -0
- package/src/contract/DSP.ts +350 -0
- package/src/contract/DSPFactory.ts +110 -0
- package/src/contract/DVM.ts +320 -0
- package/src/contract/DVMFactory.ts +110 -0
- package/src/contract/ERC20.ts +60 -0
- package/src/contract/ERC20Helper.ts +40 -0
- package/src/contract/ERC20MineV3.ts +130 -0
- package/src/contract/ERC20V3Factory.ts +110 -0
- package/src/contract/FeeRateDIP3Impl.ts +100 -0
- package/src/contract/FeeRateModel.ts +40 -0
- package/src/contract/GSP.ts +410 -0
- package/src/contract/GSPFactory.ts +100 -0
- package/src/contract/InitializableERC20.ts +70 -0
- package/src/contract/LimitOrder.ts +100 -0
- package/src/contract/LimitOrderBot.ts +60 -0
- package/src/contract/MulticallWithValid.ts +70 -0
- package/src/contract/PermissionManager.ts +40 -0
- package/src/contract/UniswapV2Factory.ts +51 -1
- package/src/contract/UniswapV2Pair.ts +190 -0
- package/src/contract/UniswapV2Router02.ts +71 -1
- package/src/contract/dodoTeam.ts +140 -0
- package/src/contract/vDODOToken.ts +300 -0
- package/src/index.ts +2 -1
package/src/contract/DVM.ts
CHANGED
|
@@ -15,6 +15,16 @@ export function fetchDVMDOMAIN_SEPARATOR(chainId: number, __to: string) {
|
|
|
15
15
|
const __data = hexlify(concat(['0x3644e515', __encodeData]));
|
|
16
16
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"","type":"bytes32"}])
|
|
17
17
|
}
|
|
18
|
+
export function getFetchDVMDOMAIN_SEPARATORQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
19
|
+
return {
|
|
20
|
+
queryKey: ['contract-request', chainId, __to],
|
|
21
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
22
|
+
queryFn: () => {
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
return fetchDVMDOMAIN_SEPARATOR(chainId, __to);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
18
28
|
|
|
19
29
|
/**
|
|
20
30
|
* fetch PERMIT_TYPEHASH
|
|
@@ -27,6 +37,16 @@ export function fetchDVMPERMIT_TYPEHASH(chainId: number, __to: string) {
|
|
|
27
37
|
const __data = hexlify(concat(['0x30adf81f', __encodeData]));
|
|
28
38
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"","type":"bytes32"}])
|
|
29
39
|
}
|
|
40
|
+
export function getFetchDVMPERMIT_TYPEHASHQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
41
|
+
return {
|
|
42
|
+
queryKey: ['contract-request', chainId, __to],
|
|
43
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
44
|
+
queryFn: () => {
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
return fetchDVMPERMIT_TYPEHASH(chainId, __to);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
30
50
|
|
|
31
51
|
/**
|
|
32
52
|
* fetch _BASE_PRICE_CUMULATIVE_LAST_
|
|
@@ -39,6 +59,16 @@ export function fetchDVM_BASE_PRICE_CUMULATIVE_LAST_(chainId: number, __to: stri
|
|
|
39
59
|
const __data = hexlify(concat(['0xfe24cb7f', __encodeData]));
|
|
40
60
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
41
61
|
}
|
|
62
|
+
export function getFetchDVM_BASE_PRICE_CUMULATIVE_LAST_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
63
|
+
return {
|
|
64
|
+
queryKey: ['contract-request', chainId, __to],
|
|
65
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
66
|
+
queryFn: () => {
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
return fetchDVM_BASE_PRICE_CUMULATIVE_LAST_(chainId, __to);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
42
72
|
|
|
43
73
|
/**
|
|
44
74
|
* fetch _BASE_RESERVE_
|
|
@@ -51,6 +81,16 @@ export function fetchDVM_BASE_RESERVE_(chainId: number, __to: string) {
|
|
|
51
81
|
const __data = hexlify(concat(['0x7d721504', __encodeData]));
|
|
52
82
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint112","name":"","type":"uint112"}])
|
|
53
83
|
}
|
|
84
|
+
export function getFetchDVM_BASE_RESERVE_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
85
|
+
return {
|
|
86
|
+
queryKey: ['contract-request', chainId, __to],
|
|
87
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
88
|
+
queryFn: () => {
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
return fetchDVM_BASE_RESERVE_(chainId, __to);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
54
94
|
|
|
55
95
|
/**
|
|
56
96
|
* fetch _BASE_TOKEN_
|
|
@@ -63,6 +103,16 @@ export function fetchDVM_BASE_TOKEN_(chainId: number, __to: string) {
|
|
|
63
103
|
const __data = hexlify(concat(['0x4a248d2a', __encodeData]));
|
|
64
104
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"contract IERC20","name":"","type":"address"}])
|
|
65
105
|
}
|
|
106
|
+
export function getFetchDVM_BASE_TOKEN_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
107
|
+
return {
|
|
108
|
+
queryKey: ['contract-request', chainId, __to],
|
|
109
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
110
|
+
queryFn: () => {
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
return fetchDVM_BASE_TOKEN_(chainId, __to);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
66
116
|
|
|
67
117
|
/**
|
|
68
118
|
* fetch _BLOCK_TIMESTAMP_LAST_
|
|
@@ -75,6 +125,16 @@ export function fetchDVM_BLOCK_TIMESTAMP_LAST_(chainId: number, __to: string) {
|
|
|
75
125
|
const __data = hexlify(concat(['0x880a4d87', __encodeData]));
|
|
76
126
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint32","name":"","type":"uint32"}])
|
|
77
127
|
}
|
|
128
|
+
export function getFetchDVM_BLOCK_TIMESTAMP_LAST_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
129
|
+
return {
|
|
130
|
+
queryKey: ['contract-request', chainId, __to],
|
|
131
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
132
|
+
queryFn: () => {
|
|
133
|
+
// @ts-ignore
|
|
134
|
+
return fetchDVM_BLOCK_TIMESTAMP_LAST_(chainId, __to);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
78
138
|
|
|
79
139
|
/**
|
|
80
140
|
* fetch _IS_OPEN_TWAP_
|
|
@@ -87,6 +147,16 @@ export function fetchDVM_IS_OPEN_TWAP_(chainId: number, __to: string) {
|
|
|
87
147
|
const __data = hexlify(concat(['0x2df6cb48', __encodeData]));
|
|
88
148
|
return contractRequests.batchCall<boolean>(chainId, __to, __data, [{"internalType":"bool","name":"","type":"bool"}])
|
|
89
149
|
}
|
|
150
|
+
export function getFetchDVM_IS_OPEN_TWAP_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
151
|
+
return {
|
|
152
|
+
queryKey: ['contract-request', chainId, __to],
|
|
153
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
154
|
+
queryFn: () => {
|
|
155
|
+
// @ts-ignore
|
|
156
|
+
return fetchDVM_IS_OPEN_TWAP_(chainId, __to);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
90
160
|
|
|
91
161
|
/**
|
|
92
162
|
* fetch _I_
|
|
@@ -99,6 +169,16 @@ export function fetchDVM_I_(chainId: number, __to: string) {
|
|
|
99
169
|
const __data = hexlify(concat(['0xf811d692', __encodeData]));
|
|
100
170
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
101
171
|
}
|
|
172
|
+
export function getFetchDVM_I_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
173
|
+
return {
|
|
174
|
+
queryKey: ['contract-request', chainId, __to],
|
|
175
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
176
|
+
queryFn: () => {
|
|
177
|
+
// @ts-ignore
|
|
178
|
+
return fetchDVM_I_(chainId, __to);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
102
182
|
|
|
103
183
|
/**
|
|
104
184
|
* fetch _K_
|
|
@@ -111,6 +191,16 @@ export function fetchDVM_K_(chainId: number, __to: string) {
|
|
|
111
191
|
const __data = hexlify(concat(['0xec2fd46d', __encodeData]));
|
|
112
192
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
113
193
|
}
|
|
194
|
+
export function getFetchDVM_K_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
195
|
+
return {
|
|
196
|
+
queryKey: ['contract-request', chainId, __to],
|
|
197
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
198
|
+
queryFn: () => {
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
return fetchDVM_K_(chainId, __to);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
114
204
|
|
|
115
205
|
/**
|
|
116
206
|
* fetch _LP_FEE_RATE_
|
|
@@ -123,6 +213,16 @@ export function fetchDVM_LP_FEE_RATE_(chainId: number, __to: string) {
|
|
|
123
213
|
const __data = hexlify(concat(['0xab44a7a3', __encodeData]));
|
|
124
214
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
125
215
|
}
|
|
216
|
+
export function getFetchDVM_LP_FEE_RATE_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
217
|
+
return {
|
|
218
|
+
queryKey: ['contract-request', chainId, __to],
|
|
219
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
220
|
+
queryFn: () => {
|
|
221
|
+
// @ts-ignore
|
|
222
|
+
return fetchDVM_LP_FEE_RATE_(chainId, __to);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
126
226
|
|
|
127
227
|
/**
|
|
128
228
|
* fetch _MAINTAINER_
|
|
@@ -135,6 +235,16 @@ export function fetchDVM_MAINTAINER_(chainId: number, __to: string) {
|
|
|
135
235
|
const __data = hexlify(concat(['0x4322ec83', __encodeData]));
|
|
136
236
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
137
237
|
}
|
|
238
|
+
export function getFetchDVM_MAINTAINER_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
239
|
+
return {
|
|
240
|
+
queryKey: ['contract-request', chainId, __to],
|
|
241
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
242
|
+
queryFn: () => {
|
|
243
|
+
// @ts-ignore
|
|
244
|
+
return fetchDVM_MAINTAINER_(chainId, __to);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
138
248
|
|
|
139
249
|
/**
|
|
140
250
|
* fetch _MT_FEE_RATE_MODEL_
|
|
@@ -147,6 +257,16 @@ export function fetchDVM_MT_FEE_RATE_MODEL_(chainId: number, __to: string) {
|
|
|
147
257
|
const __data = hexlify(concat(['0xf6b06e70', __encodeData]));
|
|
148
258
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"contract IFeeRateModel","name":"","type":"address"}])
|
|
149
259
|
}
|
|
260
|
+
export function getFetchDVM_MT_FEE_RATE_MODEL_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
261
|
+
return {
|
|
262
|
+
queryKey: ['contract-request', chainId, __to],
|
|
263
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
264
|
+
queryFn: () => {
|
|
265
|
+
// @ts-ignore
|
|
266
|
+
return fetchDVM_MT_FEE_RATE_MODEL_(chainId, __to);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
150
270
|
|
|
151
271
|
/**
|
|
152
272
|
* fetch _QUOTE_RESERVE_
|
|
@@ -159,6 +279,16 @@ export function fetchDVM_QUOTE_RESERVE_(chainId: number, __to: string) {
|
|
|
159
279
|
const __data = hexlify(concat(['0xbbf5ce78', __encodeData]));
|
|
160
280
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint112","name":"","type":"uint112"}])
|
|
161
281
|
}
|
|
282
|
+
export function getFetchDVM_QUOTE_RESERVE_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
283
|
+
return {
|
|
284
|
+
queryKey: ['contract-request', chainId, __to],
|
|
285
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
286
|
+
queryFn: () => {
|
|
287
|
+
// @ts-ignore
|
|
288
|
+
return fetchDVM_QUOTE_RESERVE_(chainId, __to);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
162
292
|
|
|
163
293
|
/**
|
|
164
294
|
* fetch _QUOTE_TOKEN_
|
|
@@ -171,6 +301,16 @@ export function fetchDVM_QUOTE_TOKEN_(chainId: number, __to: string) {
|
|
|
171
301
|
const __data = hexlify(concat(['0xd4b97046', __encodeData]));
|
|
172
302
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"contract IERC20","name":"","type":"address"}])
|
|
173
303
|
}
|
|
304
|
+
export function getFetchDVM_QUOTE_TOKEN_QueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
305
|
+
return {
|
|
306
|
+
queryKey: ['contract-request', chainId, __to],
|
|
307
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
308
|
+
queryFn: () => {
|
|
309
|
+
// @ts-ignore
|
|
310
|
+
return fetchDVM_QUOTE_TOKEN_(chainId, __to);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
174
314
|
|
|
175
315
|
/**
|
|
176
316
|
* fetch addressToShortString
|
|
@@ -184,6 +324,16 @@ export function fetchDVMAddressToShortString(chainId: number, __to: string, _add
|
|
|
184
324
|
const __data = hexlify(concat(['0x17101940', __encodeData]));
|
|
185
325
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
186
326
|
}
|
|
327
|
+
export function getFetchDVMAddressToShortStringQueryOptions(chainId: number | undefined, __to: string | undefined, _addr: string | undefined) {
|
|
328
|
+
return {
|
|
329
|
+
queryKey: ['contract-request', chainId, __to, _addr],
|
|
330
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, _addr !== undefined && _addr !== null],
|
|
331
|
+
queryFn: () => {
|
|
332
|
+
// @ts-ignore
|
|
333
|
+
return fetchDVMAddressToShortString(chainId, __to, _addr);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
187
337
|
|
|
188
338
|
/**
|
|
189
339
|
* fetch allowance
|
|
@@ -198,6 +348,16 @@ export function fetchDVMAllowance(chainId: number, __to: string, owner: string,
|
|
|
198
348
|
const __data = hexlify(concat(['0xdd62ed3e', __encodeData]));
|
|
199
349
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
200
350
|
}
|
|
351
|
+
export function getFetchDVMAllowanceQueryOptions(chainId: number | undefined, __to: string | undefined, owner: string | undefined, spender: string | undefined) {
|
|
352
|
+
return {
|
|
353
|
+
queryKey: ['contract-request', chainId, __to, owner, spender],
|
|
354
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, owner !== undefined && owner !== null, spender !== undefined && spender !== null],
|
|
355
|
+
queryFn: () => {
|
|
356
|
+
// @ts-ignore
|
|
357
|
+
return fetchDVMAllowance(chainId, __to, owner, spender);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
201
361
|
|
|
202
362
|
/**
|
|
203
363
|
* fetch balanceOf
|
|
@@ -211,6 +371,16 @@ export function fetchDVMBalanceOf(chainId: number, __to: string, owner: string)
|
|
|
211
371
|
const __data = hexlify(concat(['0x70a08231', __encodeData]));
|
|
212
372
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"balance","type":"uint256"}])
|
|
213
373
|
}
|
|
374
|
+
export function getFetchDVMBalanceOfQueryOptions(chainId: number | undefined, __to: string | undefined, owner: string | undefined) {
|
|
375
|
+
return {
|
|
376
|
+
queryKey: ['contract-request', chainId, __to, owner],
|
|
377
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, owner !== undefined && owner !== null],
|
|
378
|
+
queryFn: () => {
|
|
379
|
+
// @ts-ignore
|
|
380
|
+
return fetchDVMBalanceOf(chainId, __to, owner);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
214
384
|
|
|
215
385
|
/**
|
|
216
386
|
* fetch decimals
|
|
@@ -223,6 +393,16 @@ export function fetchDVMDecimals(chainId: number, __to: string) {
|
|
|
223
393
|
const __data = hexlify(concat(['0x313ce567', __encodeData]));
|
|
224
394
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint8","name":"","type":"uint8"}])
|
|
225
395
|
}
|
|
396
|
+
export function getFetchDVMDecimalsQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
397
|
+
return {
|
|
398
|
+
queryKey: ['contract-request', chainId, __to],
|
|
399
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
400
|
+
queryFn: () => {
|
|
401
|
+
// @ts-ignore
|
|
402
|
+
return fetchDVMDecimals(chainId, __to);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
}
|
|
226
406
|
|
|
227
407
|
/**
|
|
228
408
|
* fetch getBaseInput
|
|
@@ -235,6 +415,16 @@ export function fetchDVMGetBaseInput(chainId: number, __to: string) {
|
|
|
235
415
|
const __data = hexlify(concat(['0x65f6fcbb', __encodeData]));
|
|
236
416
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"input","type":"uint256"}])
|
|
237
417
|
}
|
|
418
|
+
export function getFetchDVMGetBaseInputQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
419
|
+
return {
|
|
420
|
+
queryKey: ['contract-request', chainId, __to],
|
|
421
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
422
|
+
queryFn: () => {
|
|
423
|
+
// @ts-ignore
|
|
424
|
+
return fetchDVMGetBaseInput(chainId, __to);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
238
428
|
|
|
239
429
|
/**
|
|
240
430
|
* fetch getMidPrice
|
|
@@ -247,6 +437,16 @@ export function fetchDVMGetMidPrice(chainId: number, __to: string) {
|
|
|
247
437
|
const __data = hexlify(concat(['0xee27c689', __encodeData]));
|
|
248
438
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"midPrice","type":"uint256"}])
|
|
249
439
|
}
|
|
440
|
+
export function getFetchDVMGetMidPriceQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
441
|
+
return {
|
|
442
|
+
queryKey: ['contract-request', chainId, __to],
|
|
443
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
444
|
+
queryFn: () => {
|
|
445
|
+
// @ts-ignore
|
|
446
|
+
return fetchDVMGetMidPrice(chainId, __to);
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
250
450
|
|
|
251
451
|
/**
|
|
252
452
|
* fetch getPMMState
|
|
@@ -259,6 +459,16 @@ export function fetchDVMGetPMMState(chainId: number, __to: string) {
|
|
|
259
459
|
const __data = hexlify(concat(['0xa382d1b9', __encodeData]));
|
|
260
460
|
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"}])
|
|
261
461
|
}
|
|
462
|
+
export function getFetchDVMGetPMMStateQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
463
|
+
return {
|
|
464
|
+
queryKey: ['contract-request', chainId, __to],
|
|
465
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
466
|
+
queryFn: () => {
|
|
467
|
+
// @ts-ignore
|
|
468
|
+
return fetchDVMGetPMMState(chainId, __to);
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
262
472
|
|
|
263
473
|
/**
|
|
264
474
|
* fetch getPMMStateForCall
|
|
@@ -285,6 +495,16 @@ export function fetchDVMGetPMMStateForCall(chainId: number, __to: string) {
|
|
|
285
495
|
R: bigint;
|
|
286
496
|
}>(chainId, __to, __data, [{"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":"uint256","name":"R","type":"uint256"}])
|
|
287
497
|
}
|
|
498
|
+
export function getFetchDVMGetPMMStateForCallQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
499
|
+
return {
|
|
500
|
+
queryKey: ['contract-request', chainId, __to],
|
|
501
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
502
|
+
queryFn: () => {
|
|
503
|
+
// @ts-ignore
|
|
504
|
+
return fetchDVMGetPMMStateForCall(chainId, __to);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
288
508
|
|
|
289
509
|
/**
|
|
290
510
|
* fetch getQuoteInput
|
|
@@ -297,6 +517,16 @@ export function fetchDVMGetQuoteInput(chainId: number, __to: string) {
|
|
|
297
517
|
const __data = hexlify(concat(['0x71f9100c', __encodeData]));
|
|
298
518
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"input","type":"uint256"}])
|
|
299
519
|
}
|
|
520
|
+
export function getFetchDVMGetQuoteInputQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
521
|
+
return {
|
|
522
|
+
queryKey: ['contract-request', chainId, __to],
|
|
523
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
524
|
+
queryFn: () => {
|
|
525
|
+
// @ts-ignore
|
|
526
|
+
return fetchDVMGetQuoteInput(chainId, __to);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
300
530
|
|
|
301
531
|
/**
|
|
302
532
|
* fetch getUserFeeRate
|
|
@@ -314,6 +544,16 @@ export function fetchDVMGetUserFeeRate(chainId: number, __to: string, user: stri
|
|
|
314
544
|
mtFeeRate: bigint;
|
|
315
545
|
}>(chainId, __to, __data, [{"internalType":"uint256","name":"lpFeeRate","type":"uint256"},{"internalType":"uint256","name":"mtFeeRate","type":"uint256"}])
|
|
316
546
|
}
|
|
547
|
+
export function getFetchDVMGetUserFeeRateQueryOptions(chainId: number | undefined, __to: string | undefined, user: string | undefined) {
|
|
548
|
+
return {
|
|
549
|
+
queryKey: ['contract-request', chainId, __to, user],
|
|
550
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, user !== undefined && user !== null],
|
|
551
|
+
queryFn: () => {
|
|
552
|
+
// @ts-ignore
|
|
553
|
+
return fetchDVMGetUserFeeRate(chainId, __to, user);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
317
557
|
|
|
318
558
|
/**
|
|
319
559
|
* fetch getVaultReserve
|
|
@@ -330,6 +570,16 @@ export function fetchDVMGetVaultReserve(chainId: number, __to: string) {
|
|
|
330
570
|
quoteReserve: bigint;
|
|
331
571
|
}>(chainId, __to, __data, [{"internalType":"uint256","name":"baseReserve","type":"uint256"},{"internalType":"uint256","name":"quoteReserve","type":"uint256"}])
|
|
332
572
|
}
|
|
573
|
+
export function getFetchDVMGetVaultReserveQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
574
|
+
return {
|
|
575
|
+
queryKey: ['contract-request', chainId, __to],
|
|
576
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
577
|
+
queryFn: () => {
|
|
578
|
+
// @ts-ignore
|
|
579
|
+
return fetchDVMGetVaultReserve(chainId, __to);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
333
583
|
|
|
334
584
|
/**
|
|
335
585
|
* fetch name
|
|
@@ -342,6 +592,16 @@ export function fetchDVMName(chainId: number, __to: string) {
|
|
|
342
592
|
const __data = hexlify(concat(['0x06fdde03', __encodeData]));
|
|
343
593
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
344
594
|
}
|
|
595
|
+
export function getFetchDVMNameQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
596
|
+
return {
|
|
597
|
+
queryKey: ['contract-request', chainId, __to],
|
|
598
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
599
|
+
queryFn: () => {
|
|
600
|
+
// @ts-ignore
|
|
601
|
+
return fetchDVMName(chainId, __to);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
345
605
|
|
|
346
606
|
/**
|
|
347
607
|
* fetch nonces
|
|
@@ -355,6 +615,16 @@ export function fetchDVMNonces(chainId: number, __to: string, __input1: string)
|
|
|
355
615
|
const __data = hexlify(concat(['0x7ecebe00', __encodeData]));
|
|
356
616
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
357
617
|
}
|
|
618
|
+
export function getFetchDVMNoncesQueryOptions(chainId: number | undefined, __to: string | undefined, __input1: string | undefined) {
|
|
619
|
+
return {
|
|
620
|
+
queryKey: ['contract-request', chainId, __to, __input1],
|
|
621
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, __input1 !== undefined && __input1 !== null],
|
|
622
|
+
queryFn: () => {
|
|
623
|
+
// @ts-ignore
|
|
624
|
+
return fetchDVMNonces(chainId, __to, __input1);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
}
|
|
358
628
|
|
|
359
629
|
/**
|
|
360
630
|
* fetch querySellBase
|
|
@@ -373,6 +643,16 @@ export function fetchDVMQuerySellBase(chainId: number, __to: string, trader: str
|
|
|
373
643
|
mtFee: bigint;
|
|
374
644
|
}>(chainId, __to, __data, [{"internalType":"uint256","name":"receiveQuoteAmount","type":"uint256"},{"internalType":"uint256","name":"mtFee","type":"uint256"}])
|
|
375
645
|
}
|
|
646
|
+
export function getFetchDVMQuerySellBaseQueryOptions(chainId: number | undefined, __to: string | undefined, trader: string | undefined, payBaseAmount: number | undefined) {
|
|
647
|
+
return {
|
|
648
|
+
queryKey: ['contract-request', chainId, __to, trader, payBaseAmount],
|
|
649
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, trader !== undefined && trader !== null, payBaseAmount !== undefined && payBaseAmount !== null],
|
|
650
|
+
queryFn: () => {
|
|
651
|
+
// @ts-ignore
|
|
652
|
+
return fetchDVMQuerySellBase(chainId, __to, trader, payBaseAmount);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
376
656
|
|
|
377
657
|
/**
|
|
378
658
|
* fetch querySellQuote
|
|
@@ -391,6 +671,16 @@ export function fetchDVMQuerySellQuote(chainId: number, __to: string, trader: st
|
|
|
391
671
|
mtFee: bigint;
|
|
392
672
|
}>(chainId, __to, __data, [{"internalType":"uint256","name":"receiveBaseAmount","type":"uint256"},{"internalType":"uint256","name":"mtFee","type":"uint256"}])
|
|
393
673
|
}
|
|
674
|
+
export function getFetchDVMQuerySellQuoteQueryOptions(chainId: number | undefined, __to: string | undefined, trader: string | undefined, payQuoteAmount: number | undefined) {
|
|
675
|
+
return {
|
|
676
|
+
queryKey: ['contract-request', chainId, __to, trader, payQuoteAmount],
|
|
677
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, trader !== undefined && trader !== null, payQuoteAmount !== undefined && payQuoteAmount !== null],
|
|
678
|
+
queryFn: () => {
|
|
679
|
+
// @ts-ignore
|
|
680
|
+
return fetchDVMQuerySellQuote(chainId, __to, trader, payQuoteAmount);
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
394
684
|
|
|
395
685
|
/**
|
|
396
686
|
* fetch symbol
|
|
@@ -403,6 +693,16 @@ export function fetchDVMSymbol(chainId: number, __to: string) {
|
|
|
403
693
|
const __data = hexlify(concat(['0x95d89b41', __encodeData]));
|
|
404
694
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
405
695
|
}
|
|
696
|
+
export function getFetchDVMSymbolQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
697
|
+
return {
|
|
698
|
+
queryKey: ['contract-request', chainId, __to],
|
|
699
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
700
|
+
queryFn: () => {
|
|
701
|
+
// @ts-ignore
|
|
702
|
+
return fetchDVMSymbol(chainId, __to);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
}
|
|
406
706
|
|
|
407
707
|
/**
|
|
408
708
|
* fetch totalSupply
|
|
@@ -415,6 +715,16 @@ export function fetchDVMTotalSupply(chainId: number, __to: string) {
|
|
|
415
715
|
const __data = hexlify(concat(['0x18160ddd', __encodeData]));
|
|
416
716
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
417
717
|
}
|
|
718
|
+
export function getFetchDVMTotalSupplyQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
719
|
+
return {
|
|
720
|
+
queryKey: ['contract-request', chainId, __to],
|
|
721
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
722
|
+
queryFn: () => {
|
|
723
|
+
// @ts-ignore
|
|
724
|
+
return fetchDVMTotalSupply(chainId, __to);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
418
728
|
|
|
419
729
|
/**
|
|
420
730
|
* fetch version
|
|
@@ -427,6 +737,16 @@ export function fetchDVMVersion(chainId: number, __to: string) {
|
|
|
427
737
|
const __data = hexlify(concat(['0x54fd4d50', __encodeData]));
|
|
428
738
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
429
739
|
}
|
|
740
|
+
export function getFetchDVMVersionQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
741
|
+
return {
|
|
742
|
+
queryKey: ['contract-request', chainId, __to],
|
|
743
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
744
|
+
queryFn: () => {
|
|
745
|
+
// @ts-ignore
|
|
746
|
+
return fetchDVMVersion(chainId, __to);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
430
750
|
|
|
431
751
|
/**
|
|
432
752
|
* encode approve
|