@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
|
@@ -21,6 +21,16 @@ export function fetchGSPFactory_CLONE_FACTORY_(chainId: number) {
|
|
|
21
21
|
const __data = hexlify(concat(['0xeb774d05', __encodeData]));
|
|
22
22
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
23
23
|
}
|
|
24
|
+
export function getFetchGSPFactory_CLONE_FACTORY_QueryOptions(chainId: number | undefined) {
|
|
25
|
+
return {
|
|
26
|
+
queryKey: ['contract-request', chainId],
|
|
27
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
28
|
+
queryFn: () => {
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
return fetchGSPFactory_CLONE_FACTORY_(chainId);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
24
34
|
|
|
25
35
|
/**
|
|
26
36
|
* fetch _DEFAULT_MAINTAINER_
|
|
@@ -34,6 +44,16 @@ export function fetchGSPFactory_DEFAULT_MAINTAINER_(chainId: number) {
|
|
|
34
44
|
const __data = hexlify(concat(['0x81ab4d0a', __encodeData]));
|
|
35
45
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
36
46
|
}
|
|
47
|
+
export function getFetchGSPFactory_DEFAULT_MAINTAINER_QueryOptions(chainId: number | undefined) {
|
|
48
|
+
return {
|
|
49
|
+
queryKey: ['contract-request', chainId],
|
|
50
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
51
|
+
queryFn: () => {
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
return fetchGSPFactory_DEFAULT_MAINTAINER_(chainId);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
37
57
|
|
|
38
58
|
/**
|
|
39
59
|
* fetch _GSP_TEMPLATE_
|
|
@@ -47,6 +67,16 @@ export function fetchGSPFactory_GSP_TEMPLATE_(chainId: number) {
|
|
|
47
67
|
const __data = hexlify(concat(['0x8483a1c9', __encodeData]));
|
|
48
68
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
49
69
|
}
|
|
70
|
+
export function getFetchGSPFactory_GSP_TEMPLATE_QueryOptions(chainId: number | undefined) {
|
|
71
|
+
return {
|
|
72
|
+
queryKey: ['contract-request', chainId],
|
|
73
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
74
|
+
queryFn: () => {
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
return fetchGSPFactory_GSP_TEMPLATE_(chainId);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
50
80
|
|
|
51
81
|
/**
|
|
52
82
|
* fetch _NEW_OWNER_
|
|
@@ -60,6 +90,16 @@ export function fetchGSPFactory_NEW_OWNER_(chainId: number) {
|
|
|
60
90
|
const __data = hexlify(concat(['0x8456db15', __encodeData]));
|
|
61
91
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
62
92
|
}
|
|
93
|
+
export function getFetchGSPFactory_NEW_OWNER_QueryOptions(chainId: number | undefined) {
|
|
94
|
+
return {
|
|
95
|
+
queryKey: ['contract-request', chainId],
|
|
96
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
97
|
+
queryFn: () => {
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
return fetchGSPFactory_NEW_OWNER_(chainId);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
63
103
|
|
|
64
104
|
/**
|
|
65
105
|
* fetch _OWNER_
|
|
@@ -73,6 +113,16 @@ export function fetchGSPFactory_OWNER_(chainId: number) {
|
|
|
73
113
|
const __data = hexlify(concat(['0x16048bc4', __encodeData]));
|
|
74
114
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
75
115
|
}
|
|
116
|
+
export function getFetchGSPFactory_OWNER_QueryOptions(chainId: number | undefined) {
|
|
117
|
+
return {
|
|
118
|
+
queryKey: ['contract-request', chainId],
|
|
119
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
120
|
+
queryFn: () => {
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
return fetchGSPFactory_OWNER_(chainId);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
76
126
|
|
|
77
127
|
/**
|
|
78
128
|
* fetch _REGISTRY_
|
|
@@ -89,6 +139,16 @@ export function fetchGSPFactory_REGISTRY_(chainId: number, __input1: string, __i
|
|
|
89
139
|
const __data = hexlify(concat(['0xbdeb0a91', __encodeData]));
|
|
90
140
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
91
141
|
}
|
|
142
|
+
export function getFetchGSPFactory_REGISTRY_QueryOptions(chainId: number | undefined, __input1: string | undefined, __input2: string | undefined, __input3: number | undefined) {
|
|
143
|
+
return {
|
|
144
|
+
queryKey: ['contract-request', chainId, __input1, __input2, __input3],
|
|
145
|
+
enabled: [chainId !== undefined && chainId !== null, __input1 !== undefined && __input1 !== null, __input2 !== undefined && __input2 !== null, __input3 !== undefined && __input3 !== null],
|
|
146
|
+
queryFn: () => {
|
|
147
|
+
// @ts-ignore
|
|
148
|
+
return fetchGSPFactory_REGISTRY_(chainId, __input1, __input2, __input3);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
92
152
|
|
|
93
153
|
/**
|
|
94
154
|
* fetch _USER_REGISTRY_
|
|
@@ -104,6 +164,16 @@ export function fetchGSPFactory_USER_REGISTRY_(chainId: number, __input1: string
|
|
|
104
164
|
const __data = hexlify(concat(['0xa58888db', __encodeData]));
|
|
105
165
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
106
166
|
}
|
|
167
|
+
export function getFetchGSPFactory_USER_REGISTRY_QueryOptions(chainId: number | undefined, __input1: string | undefined, __input2: number | undefined) {
|
|
168
|
+
return {
|
|
169
|
+
queryKey: ['contract-request', chainId, __input1, __input2],
|
|
170
|
+
enabled: [chainId !== undefined && chainId !== null, __input1 !== undefined && __input1 !== null, __input2 !== undefined && __input2 !== null],
|
|
171
|
+
queryFn: () => {
|
|
172
|
+
// @ts-ignore
|
|
173
|
+
return fetchGSPFactory_USER_REGISTRY_(chainId, __input1, __input2);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
107
177
|
|
|
108
178
|
/**
|
|
109
179
|
* fetch getDODOPool
|
|
@@ -119,6 +189,16 @@ export function fetchGSPFactoryGetDODOPool(chainId: number, baseToken: string, q
|
|
|
119
189
|
const __data = hexlify(concat(['0x57a281dc', __encodeData]));
|
|
120
190
|
return contractRequests.batchCall<Array<string>>(chainId, __to, __data, [{"internalType":"address[]","name":"machines","type":"address[]"}])
|
|
121
191
|
}
|
|
192
|
+
export function getFetchGSPFactoryGetDODOPoolQueryOptions(chainId: number | undefined, baseToken: string | undefined, quoteToken: string | undefined) {
|
|
193
|
+
return {
|
|
194
|
+
queryKey: ['contract-request', chainId, baseToken, quoteToken],
|
|
195
|
+
enabled: [chainId !== undefined && chainId !== null, baseToken !== undefined && baseToken !== null, quoteToken !== undefined && quoteToken !== null],
|
|
196
|
+
queryFn: () => {
|
|
197
|
+
// @ts-ignore
|
|
198
|
+
return fetchGSPFactoryGetDODOPool(chainId, baseToken, quoteToken);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
122
202
|
|
|
123
203
|
/**
|
|
124
204
|
* fetch getDODOPoolBidirection
|
|
@@ -138,6 +218,16 @@ export function fetchGSPFactoryGetDODOPoolBidirection(chainId: number, token0: s
|
|
|
138
218
|
baseToken1Machines: Array<string>;
|
|
139
219
|
}>(chainId, __to, __data, [{"internalType":"address[]","name":"baseToken0Machines","type":"address[]"},{"internalType":"address[]","name":"baseToken1Machines","type":"address[]"}])
|
|
140
220
|
}
|
|
221
|
+
export function getFetchGSPFactoryGetDODOPoolBidirectionQueryOptions(chainId: number | undefined, token0: string | undefined, token1: string | undefined) {
|
|
222
|
+
return {
|
|
223
|
+
queryKey: ['contract-request', chainId, token0, token1],
|
|
224
|
+
enabled: [chainId !== undefined && chainId !== null, token0 !== undefined && token0 !== null, token1 !== undefined && token1 !== null],
|
|
225
|
+
queryFn: () => {
|
|
226
|
+
// @ts-ignore
|
|
227
|
+
return fetchGSPFactoryGetDODOPoolBidirection(chainId, token0, token1);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
141
231
|
|
|
142
232
|
/**
|
|
143
233
|
* fetch getDODOPoolByUser
|
|
@@ -152,6 +242,16 @@ export function fetchGSPFactoryGetDODOPoolByUser(chainId: number, user: string)
|
|
|
152
242
|
const __data = hexlify(concat(['0xe65f7029', __encodeData]));
|
|
153
243
|
return contractRequests.batchCall<Array<string>>(chainId, __to, __data, [{"internalType":"address[]","name":"machines","type":"address[]"}])
|
|
154
244
|
}
|
|
245
|
+
export function getFetchGSPFactoryGetDODOPoolByUserQueryOptions(chainId: number | undefined, user: string | undefined) {
|
|
246
|
+
return {
|
|
247
|
+
queryKey: ['contract-request', chainId, user],
|
|
248
|
+
enabled: [chainId !== undefined && chainId !== null, user !== undefined && user !== null],
|
|
249
|
+
queryFn: () => {
|
|
250
|
+
// @ts-ignore
|
|
251
|
+
return fetchGSPFactoryGetDODOPoolByUser(chainId, user);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
155
255
|
|
|
156
256
|
/**
|
|
157
257
|
* encode addPoolByAdmin
|
|
@@ -17,6 +17,16 @@ export function fetchInitializableERC20Allowance(chainId: number, __to: string,
|
|
|
17
17
|
const __data = hexlify(concat(['0xdd62ed3e', __encodeData]));
|
|
18
18
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
19
19
|
}
|
|
20
|
+
export function getFetchInitializableERC20AllowanceQueryOptions(chainId: number | undefined, __to: string | undefined, owner: string | undefined, spender: string | undefined) {
|
|
21
|
+
return {
|
|
22
|
+
queryKey: ['contract-request', chainId, __to, owner, spender],
|
|
23
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, owner !== undefined && owner !== null, spender !== undefined && spender !== null],
|
|
24
|
+
queryFn: () => {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
return fetchInitializableERC20Allowance(chainId, __to, owner, spender);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
20
30
|
|
|
21
31
|
/**
|
|
22
32
|
* fetch balanceOf
|
|
@@ -30,6 +40,16 @@ export function fetchInitializableERC20BalanceOf(chainId: number, __to: string,
|
|
|
30
40
|
const __data = hexlify(concat(['0x70a08231', __encodeData]));
|
|
31
41
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"balance","type":"uint256"}])
|
|
32
42
|
}
|
|
43
|
+
export function getFetchInitializableERC20BalanceOfQueryOptions(chainId: number | undefined, __to: string | undefined, owner: string | undefined) {
|
|
44
|
+
return {
|
|
45
|
+
queryKey: ['contract-request', chainId, __to, owner],
|
|
46
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null, owner !== undefined && owner !== null],
|
|
47
|
+
queryFn: () => {
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
return fetchInitializableERC20BalanceOf(chainId, __to, owner);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
33
53
|
|
|
34
54
|
/**
|
|
35
55
|
* fetch decimals
|
|
@@ -42,6 +62,16 @@ export function fetchInitializableERC20Decimals(chainId: number, __to: string) {
|
|
|
42
62
|
const __data = hexlify(concat(['0x313ce567', __encodeData]));
|
|
43
63
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint8","name":"","type":"uint8"}])
|
|
44
64
|
}
|
|
65
|
+
export function getFetchInitializableERC20DecimalsQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
66
|
+
return {
|
|
67
|
+
queryKey: ['contract-request', chainId, __to],
|
|
68
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
69
|
+
queryFn: () => {
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
return fetchInitializableERC20Decimals(chainId, __to);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
45
75
|
|
|
46
76
|
/**
|
|
47
77
|
* fetch initialized
|
|
@@ -54,6 +84,16 @@ export function fetchInitializableERC20Initialized(chainId: number, __to: string
|
|
|
54
84
|
const __data = hexlify(concat(['0x158ef93e', __encodeData]));
|
|
55
85
|
return contractRequests.batchCall<boolean>(chainId, __to, __data, [{"internalType":"bool","name":"","type":"bool"}])
|
|
56
86
|
}
|
|
87
|
+
export function getFetchInitializableERC20InitializedQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
88
|
+
return {
|
|
89
|
+
queryKey: ['contract-request', chainId, __to],
|
|
90
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
91
|
+
queryFn: () => {
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
return fetchInitializableERC20Initialized(chainId, __to);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
57
97
|
|
|
58
98
|
/**
|
|
59
99
|
* fetch name
|
|
@@ -66,6 +106,16 @@ export function fetchInitializableERC20Name(chainId: number, __to: string) {
|
|
|
66
106
|
const __data = hexlify(concat(['0x06fdde03', __encodeData]));
|
|
67
107
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
68
108
|
}
|
|
109
|
+
export function getFetchInitializableERC20NameQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
110
|
+
return {
|
|
111
|
+
queryKey: ['contract-request', chainId, __to],
|
|
112
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
113
|
+
queryFn: () => {
|
|
114
|
+
// @ts-ignore
|
|
115
|
+
return fetchInitializableERC20Name(chainId, __to);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
69
119
|
|
|
70
120
|
/**
|
|
71
121
|
* fetch symbol
|
|
@@ -78,6 +128,16 @@ export function fetchInitializableERC20Symbol(chainId: number, __to: string) {
|
|
|
78
128
|
const __data = hexlify(concat(['0x95d89b41', __encodeData]));
|
|
79
129
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"string","name":"","type":"string"}])
|
|
80
130
|
}
|
|
131
|
+
export function getFetchInitializableERC20SymbolQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
132
|
+
return {
|
|
133
|
+
queryKey: ['contract-request', chainId, __to],
|
|
134
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
135
|
+
queryFn: () => {
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
return fetchInitializableERC20Symbol(chainId, __to);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
81
141
|
|
|
82
142
|
/**
|
|
83
143
|
* fetch totalSupply
|
|
@@ -90,6 +150,16 @@ export function fetchInitializableERC20TotalSupply(chainId: number, __to: string
|
|
|
90
150
|
const __data = hexlify(concat(['0x18160ddd', __encodeData]));
|
|
91
151
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
92
152
|
}
|
|
153
|
+
export function getFetchInitializableERC20TotalSupplyQueryOptions(chainId: number | undefined, __to: string | undefined) {
|
|
154
|
+
return {
|
|
155
|
+
queryKey: ['contract-request', chainId, __to],
|
|
156
|
+
enabled: [chainId !== undefined && chainId !== null, __to !== undefined && __to !== null],
|
|
157
|
+
queryFn: () => {
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
return fetchInitializableERC20TotalSupply(chainId, __to);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
93
163
|
|
|
94
164
|
/**
|
|
95
165
|
* encode approve
|
|
@@ -21,6 +21,16 @@ export function fetchLimitOrderORDER_TYPEHASH(chainId: number) {
|
|
|
21
21
|
const __data = hexlify(concat(['0xf973a209', __encodeData]));
|
|
22
22
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"","type":"bytes32"}])
|
|
23
23
|
}
|
|
24
|
+
export function getFetchLimitOrderORDER_TYPEHASHQueryOptions(chainId: number | undefined) {
|
|
25
|
+
return {
|
|
26
|
+
queryKey: ['contract-request', chainId],
|
|
27
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
28
|
+
queryFn: () => {
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
return fetchLimitOrderORDER_TYPEHASH(chainId);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
24
34
|
|
|
25
35
|
/**
|
|
26
36
|
* fetch RFQ_ORDER_TYPEHASH
|
|
@@ -34,6 +44,16 @@ export function fetchLimitOrderRFQ_ORDER_TYPEHASH(chainId: number) {
|
|
|
34
44
|
const __data = hexlify(concat(['0x3f45e230', __encodeData]));
|
|
35
45
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"","type":"bytes32"}])
|
|
36
46
|
}
|
|
47
|
+
export function getFetchLimitOrderRFQ_ORDER_TYPEHASHQueryOptions(chainId: number | undefined) {
|
|
48
|
+
return {
|
|
49
|
+
queryKey: ['contract-request', chainId],
|
|
50
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
51
|
+
queryFn: () => {
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
return fetchLimitOrderRFQ_ORDER_TYPEHASH(chainId);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
37
57
|
|
|
38
58
|
/**
|
|
39
59
|
* fetch _DODO_APPROVE_PROXY_
|
|
@@ -47,6 +67,16 @@ export function fetchLimitOrder_DODO_APPROVE_PROXY_(chainId: number) {
|
|
|
47
67
|
const __data = hexlify(concat(['0xeb99be12', __encodeData]));
|
|
48
68
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
49
69
|
}
|
|
70
|
+
export function getFetchLimitOrder_DODO_APPROVE_PROXY_QueryOptions(chainId: number | undefined) {
|
|
71
|
+
return {
|
|
72
|
+
queryKey: ['contract-request', chainId],
|
|
73
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
74
|
+
queryFn: () => {
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
return fetchLimitOrder_DODO_APPROVE_PROXY_(chainId);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
50
80
|
|
|
51
81
|
/**
|
|
52
82
|
* fetch _FEE_RECEIVER_
|
|
@@ -60,6 +90,16 @@ export function fetchLimitOrder_FEE_RECEIVER_(chainId: number) {
|
|
|
60
90
|
const __data = hexlify(concat(['0x7161e0f2', __encodeData]));
|
|
61
91
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
62
92
|
}
|
|
93
|
+
export function getFetchLimitOrder_FEE_RECEIVER_QueryOptions(chainId: number | undefined) {
|
|
94
|
+
return {
|
|
95
|
+
queryKey: ['contract-request', chainId],
|
|
96
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
97
|
+
queryFn: () => {
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
return fetchLimitOrder_FEE_RECEIVER_(chainId);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
63
103
|
|
|
64
104
|
/**
|
|
65
105
|
* fetch _FILLED_TAKER_AMOUNT_
|
|
@@ -74,6 +114,16 @@ export function fetchLimitOrder_FILLED_TAKER_AMOUNT_(chainId: number, __input1:
|
|
|
74
114
|
const __data = hexlify(concat(['0x1068705b', __encodeData]));
|
|
75
115
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
76
116
|
}
|
|
117
|
+
export function getFetchLimitOrder_FILLED_TAKER_AMOUNT_QueryOptions(chainId: number | undefined, __input1: string | undefined) {
|
|
118
|
+
return {
|
|
119
|
+
queryKey: ['contract-request', chainId, __input1],
|
|
120
|
+
enabled: [chainId !== undefined && chainId !== null, __input1 !== undefined && __input1 !== null],
|
|
121
|
+
queryFn: () => {
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
return fetchLimitOrder_FILLED_TAKER_AMOUNT_(chainId, __input1);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
77
127
|
|
|
78
128
|
/**
|
|
79
129
|
* fetch _NEW_OWNER_
|
|
@@ -87,6 +137,16 @@ export function fetchLimitOrder_NEW_OWNER_(chainId: number) {
|
|
|
87
137
|
const __data = hexlify(concat(['0x8456db15', __encodeData]));
|
|
88
138
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
89
139
|
}
|
|
140
|
+
export function getFetchLimitOrder_NEW_OWNER_QueryOptions(chainId: number | undefined) {
|
|
141
|
+
return {
|
|
142
|
+
queryKey: ['contract-request', chainId],
|
|
143
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
144
|
+
queryFn: () => {
|
|
145
|
+
// @ts-ignore
|
|
146
|
+
return fetchLimitOrder_NEW_OWNER_(chainId);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
90
150
|
|
|
91
151
|
/**
|
|
92
152
|
* fetch _OWNER_
|
|
@@ -100,6 +160,16 @@ export function fetchLimitOrder_OWNER_(chainId: number) {
|
|
|
100
160
|
const __data = hexlify(concat(['0x16048bc4', __encodeData]));
|
|
101
161
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
102
162
|
}
|
|
163
|
+
export function getFetchLimitOrder_OWNER_QueryOptions(chainId: number | undefined) {
|
|
164
|
+
return {
|
|
165
|
+
queryKey: ['contract-request', chainId],
|
|
166
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
167
|
+
queryFn: () => {
|
|
168
|
+
// @ts-ignore
|
|
169
|
+
return fetchLimitOrder_OWNER_(chainId);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
103
173
|
|
|
104
174
|
/**
|
|
105
175
|
* fetch _RFQ_FILLED_TAKER_AMOUNT_
|
|
@@ -115,6 +185,16 @@ export function fetchLimitOrder_RFQ_FILLED_TAKER_AMOUNT_(chainId: number, __inpu
|
|
|
115
185
|
const __data = hexlify(concat(['0x3b11fffa', __encodeData]));
|
|
116
186
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"","type":"uint256"}])
|
|
117
187
|
}
|
|
188
|
+
export function getFetchLimitOrder_RFQ_FILLED_TAKER_AMOUNT_QueryOptions(chainId: number | undefined, __input1: string | undefined, __input2: number | undefined) {
|
|
189
|
+
return {
|
|
190
|
+
queryKey: ['contract-request', chainId, __input1, __input2],
|
|
191
|
+
enabled: [chainId !== undefined && chainId !== null, __input1 !== undefined && __input1 !== null, __input2 !== undefined && __input2 !== null],
|
|
192
|
+
queryFn: () => {
|
|
193
|
+
// @ts-ignore
|
|
194
|
+
return fetchLimitOrder_RFQ_FILLED_TAKER_AMOUNT_(chainId, __input1, __input2);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
118
198
|
|
|
119
199
|
/**
|
|
120
200
|
* fetch isAdminListed
|
|
@@ -129,6 +209,16 @@ export function fetchLimitOrderIsAdminListed(chainId: number, __input1: string)
|
|
|
129
209
|
const __data = hexlify(concat(['0x1822c0c0', __encodeData]));
|
|
130
210
|
return contractRequests.batchCall<boolean>(chainId, __to, __data, [{"internalType":"bool","name":"","type":"bool"}])
|
|
131
211
|
}
|
|
212
|
+
export function getFetchLimitOrderIsAdminListedQueryOptions(chainId: number | undefined, __input1: string | undefined) {
|
|
213
|
+
return {
|
|
214
|
+
queryKey: ['contract-request', chainId, __input1],
|
|
215
|
+
enabled: [chainId !== undefined && chainId !== null, __input1 !== undefined && __input1 !== null],
|
|
216
|
+
queryFn: () => {
|
|
217
|
+
// @ts-ignore
|
|
218
|
+
return fetchLimitOrderIsAdminListed(chainId, __input1);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
132
222
|
|
|
133
223
|
/**
|
|
134
224
|
* fetch isWhiteListed
|
|
@@ -143,6 +233,16 @@ export function fetchLimitOrderIsWhiteListed(chainId: number, __input1: string)
|
|
|
143
233
|
const __data = hexlify(concat(['0x6f9170f6', __encodeData]));
|
|
144
234
|
return contractRequests.batchCall<boolean>(chainId, __to, __data, [{"internalType":"bool","name":"","type":"bool"}])
|
|
145
235
|
}
|
|
236
|
+
export function getFetchLimitOrderIsWhiteListedQueryOptions(chainId: number | undefined, __input1: string | undefined) {
|
|
237
|
+
return {
|
|
238
|
+
queryKey: ['contract-request', chainId, __input1],
|
|
239
|
+
enabled: [chainId !== undefined && chainId !== null, __input1 !== undefined && __input1 !== null],
|
|
240
|
+
queryFn: () => {
|
|
241
|
+
// @ts-ignore
|
|
242
|
+
return fetchLimitOrderIsWhiteListed(chainId, __input1);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
146
246
|
|
|
147
247
|
/**
|
|
148
248
|
* encode addAdminList
|
|
@@ -21,6 +21,16 @@ export function fetchLimitOrderBot_DODO_APPROVE_(chainId: number) {
|
|
|
21
21
|
const __data = hexlify(concat(['0x46e74298', __encodeData]));
|
|
22
22
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
23
23
|
}
|
|
24
|
+
export function getFetchLimitOrderBot_DODO_APPROVE_QueryOptions(chainId: number | undefined) {
|
|
25
|
+
return {
|
|
26
|
+
queryKey: ['contract-request', chainId],
|
|
27
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
28
|
+
queryFn: () => {
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
return fetchLimitOrderBot_DODO_APPROVE_(chainId);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
24
34
|
|
|
25
35
|
/**
|
|
26
36
|
* fetch _DODO_LIMIT_ORDER_
|
|
@@ -34,6 +44,16 @@ export function fetchLimitOrderBot_DODO_LIMIT_ORDER_(chainId: number) {
|
|
|
34
44
|
const __data = hexlify(concat(['0xb074a789', __encodeData]));
|
|
35
45
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
36
46
|
}
|
|
47
|
+
export function getFetchLimitOrderBot_DODO_LIMIT_ORDER_QueryOptions(chainId: number | undefined) {
|
|
48
|
+
return {
|
|
49
|
+
queryKey: ['contract-request', chainId],
|
|
50
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
51
|
+
queryFn: () => {
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
return fetchLimitOrderBot_DODO_LIMIT_ORDER_(chainId);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
37
57
|
|
|
38
58
|
/**
|
|
39
59
|
* fetch _NEW_OWNER_
|
|
@@ -47,6 +67,16 @@ export function fetchLimitOrderBot_NEW_OWNER_(chainId: number) {
|
|
|
47
67
|
const __data = hexlify(concat(['0x8456db15', __encodeData]));
|
|
48
68
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
49
69
|
}
|
|
70
|
+
export function getFetchLimitOrderBot_NEW_OWNER_QueryOptions(chainId: number | undefined) {
|
|
71
|
+
return {
|
|
72
|
+
queryKey: ['contract-request', chainId],
|
|
73
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
74
|
+
queryFn: () => {
|
|
75
|
+
// @ts-ignore
|
|
76
|
+
return fetchLimitOrderBot_NEW_OWNER_(chainId);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
50
80
|
|
|
51
81
|
/**
|
|
52
82
|
* fetch _OWNER_
|
|
@@ -60,6 +90,16 @@ export function fetchLimitOrderBot_OWNER_(chainId: number) {
|
|
|
60
90
|
const __data = hexlify(concat(['0x16048bc4', __encodeData]));
|
|
61
91
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
62
92
|
}
|
|
93
|
+
export function getFetchLimitOrderBot_OWNER_QueryOptions(chainId: number | undefined) {
|
|
94
|
+
return {
|
|
95
|
+
queryKey: ['contract-request', chainId],
|
|
96
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
97
|
+
queryFn: () => {
|
|
98
|
+
// @ts-ignore
|
|
99
|
+
return fetchLimitOrderBot_OWNER_(chainId);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
63
103
|
|
|
64
104
|
/**
|
|
65
105
|
* fetch _TOKEN_RECEIVER_
|
|
@@ -73,6 +113,16 @@ export function fetchLimitOrderBot_TOKEN_RECEIVER_(chainId: number) {
|
|
|
73
113
|
const __data = hexlify(concat(['0x3b66b615', __encodeData]));
|
|
74
114
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"","type":"address"}])
|
|
75
115
|
}
|
|
116
|
+
export function getFetchLimitOrderBot_TOKEN_RECEIVER_QueryOptions(chainId: number | undefined) {
|
|
117
|
+
return {
|
|
118
|
+
queryKey: ['contract-request', chainId],
|
|
119
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
120
|
+
queryFn: () => {
|
|
121
|
+
// @ts-ignore
|
|
122
|
+
return fetchLimitOrderBot_TOKEN_RECEIVER_(chainId);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
76
126
|
|
|
77
127
|
/**
|
|
78
128
|
* fetch isAdminListed
|
|
@@ -87,6 +137,16 @@ export function fetchLimitOrderBotIsAdminListed(chainId: number, __input1: strin
|
|
|
87
137
|
const __data = hexlify(concat(['0x1822c0c0', __encodeData]));
|
|
88
138
|
return contractRequests.batchCall<boolean>(chainId, __to, __data, [{"internalType":"bool","name":"","type":"bool"}])
|
|
89
139
|
}
|
|
140
|
+
export function getFetchLimitOrderBotIsAdminListedQueryOptions(chainId: number | undefined, __input1: string | undefined) {
|
|
141
|
+
return {
|
|
142
|
+
queryKey: ['contract-request', chainId, __input1],
|
|
143
|
+
enabled: [chainId !== undefined && chainId !== null, __input1 !== undefined && __input1 !== null],
|
|
144
|
+
queryFn: () => {
|
|
145
|
+
// @ts-ignore
|
|
146
|
+
return fetchLimitOrderBotIsAdminListed(chainId, __input1);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
90
150
|
|
|
91
151
|
/**
|
|
92
152
|
* encode addAdminList
|
|
@@ -22,6 +22,16 @@ export function fetchMulticallWithValidGetBlockHash(chainId: number, blockNumber
|
|
|
22
22
|
const __data = hexlify(concat(['0xee82ac5e', __encodeData]));
|
|
23
23
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"blockHash","type":"bytes32"}])
|
|
24
24
|
}
|
|
25
|
+
export function getFetchMulticallWithValidGetBlockHashQueryOptions(chainId: number | undefined, blockNumber: number | undefined) {
|
|
26
|
+
return {
|
|
27
|
+
queryKey: ['contract-request', chainId, blockNumber],
|
|
28
|
+
enabled: [chainId !== undefined && chainId !== null, blockNumber !== undefined && blockNumber !== null],
|
|
29
|
+
queryFn: () => {
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
return fetchMulticallWithValidGetBlockHash(chainId, blockNumber);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
25
35
|
|
|
26
36
|
/**
|
|
27
37
|
* fetch getCurrentBlockCoinbase
|
|
@@ -35,6 +45,16 @@ export function fetchMulticallWithValidGetCurrentBlockCoinbase(chainId: number)
|
|
|
35
45
|
const __data = hexlify(concat(['0xa8b0574e', __encodeData]));
|
|
36
46
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"address","name":"coinbase","type":"address"}])
|
|
37
47
|
}
|
|
48
|
+
export function getFetchMulticallWithValidGetCurrentBlockCoinbaseQueryOptions(chainId: number | undefined) {
|
|
49
|
+
return {
|
|
50
|
+
queryKey: ['contract-request', chainId],
|
|
51
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
52
|
+
queryFn: () => {
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
return fetchMulticallWithValidGetCurrentBlockCoinbase(chainId);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
38
58
|
|
|
39
59
|
/**
|
|
40
60
|
* fetch getCurrentBlockDifficulty
|
|
@@ -48,6 +68,16 @@ export function fetchMulticallWithValidGetCurrentBlockDifficulty(chainId: number
|
|
|
48
68
|
const __data = hexlify(concat(['0x72425d9d', __encodeData]));
|
|
49
69
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"difficulty","type":"uint256"}])
|
|
50
70
|
}
|
|
71
|
+
export function getFetchMulticallWithValidGetCurrentBlockDifficultyQueryOptions(chainId: number | undefined) {
|
|
72
|
+
return {
|
|
73
|
+
queryKey: ['contract-request', chainId],
|
|
74
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
75
|
+
queryFn: () => {
|
|
76
|
+
// @ts-ignore
|
|
77
|
+
return fetchMulticallWithValidGetCurrentBlockDifficulty(chainId);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
51
81
|
|
|
52
82
|
/**
|
|
53
83
|
* fetch getCurrentBlockGasLimit
|
|
@@ -61,6 +91,16 @@ export function fetchMulticallWithValidGetCurrentBlockGasLimit(chainId: number)
|
|
|
61
91
|
const __data = hexlify(concat(['0x86d516e8', __encodeData]));
|
|
62
92
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"gaslimit","type":"uint256"}])
|
|
63
93
|
}
|
|
94
|
+
export function getFetchMulticallWithValidGetCurrentBlockGasLimitQueryOptions(chainId: number | undefined) {
|
|
95
|
+
return {
|
|
96
|
+
queryKey: ['contract-request', chainId],
|
|
97
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
98
|
+
queryFn: () => {
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
return fetchMulticallWithValidGetCurrentBlockGasLimit(chainId);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
64
104
|
|
|
65
105
|
/**
|
|
66
106
|
* fetch getCurrentBlockTimestamp
|
|
@@ -74,6 +114,16 @@ export function fetchMulticallWithValidGetCurrentBlockTimestamp(chainId: number)
|
|
|
74
114
|
const __data = hexlify(concat(['0x0f28c97d', __encodeData]));
|
|
75
115
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"timestamp","type":"uint256"}])
|
|
76
116
|
}
|
|
117
|
+
export function getFetchMulticallWithValidGetCurrentBlockTimestampQueryOptions(chainId: number | undefined) {
|
|
118
|
+
return {
|
|
119
|
+
queryKey: ['contract-request', chainId],
|
|
120
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
121
|
+
queryFn: () => {
|
|
122
|
+
// @ts-ignore
|
|
123
|
+
return fetchMulticallWithValidGetCurrentBlockTimestamp(chainId);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
77
127
|
|
|
78
128
|
/**
|
|
79
129
|
* fetch getEthBalance
|
|
@@ -88,6 +138,16 @@ export function fetchMulticallWithValidGetEthBalance(chainId: number, addr: stri
|
|
|
88
138
|
const __data = hexlify(concat(['0x4d2301cc', __encodeData]));
|
|
89
139
|
return contractRequests.batchCall<bigint>(chainId, __to, __data, [{"internalType":"uint256","name":"balance","type":"uint256"}])
|
|
90
140
|
}
|
|
141
|
+
export function getFetchMulticallWithValidGetEthBalanceQueryOptions(chainId: number | undefined, addr: string | undefined) {
|
|
142
|
+
return {
|
|
143
|
+
queryKey: ['contract-request', chainId, addr],
|
|
144
|
+
enabled: [chainId !== undefined && chainId !== null, addr !== undefined && addr !== null],
|
|
145
|
+
queryFn: () => {
|
|
146
|
+
// @ts-ignore
|
|
147
|
+
return fetchMulticallWithValidGetEthBalance(chainId, addr);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
91
151
|
|
|
92
152
|
/**
|
|
93
153
|
* fetch getLastBlockHash
|
|
@@ -101,6 +161,16 @@ export function fetchMulticallWithValidGetLastBlockHash(chainId: number) {
|
|
|
101
161
|
const __data = hexlify(concat(['0x27e86d6e', __encodeData]));
|
|
102
162
|
return contractRequests.batchCall<string>(chainId, __to, __data, [{"internalType":"bytes32","name":"blockHash","type":"bytes32"}])
|
|
103
163
|
}
|
|
164
|
+
export function getFetchMulticallWithValidGetLastBlockHashQueryOptions(chainId: number | undefined) {
|
|
165
|
+
return {
|
|
166
|
+
queryKey: ['contract-request', chainId],
|
|
167
|
+
enabled: [chainId !== undefined && chainId !== null],
|
|
168
|
+
queryFn: () => {
|
|
169
|
+
// @ts-ignore
|
|
170
|
+
return fetchMulticallWithValidGetLastBlockHash(chainId);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
104
174
|
|
|
105
175
|
/**
|
|
106
176
|
* encode aggregate
|