@dodoex/dodo-contract-request 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/types/contract/BuyoutModel.d.ts +10 -10
- package/dist/types/contract/CP.d.ts +5 -5
- package/dist/types/contract/CrowdPoolingFactory.d.ts +15 -15
- package/dist/types/contract/CustomERC20.d.ts +11 -11
- package/dist/types/contract/CustomMintableERC20.d.ts +15 -15
- package/dist/types/contract/D3Proxy.d.ts +20 -20
- package/dist/types/contract/D3Vault.d.ts +31 -31
- package/dist/types/contract/DODOApprove.d.ts +2 -2
- package/dist/types/contract/DODOApproveProxy.d.ts +2 -2
- package/dist/types/contract/DODOCalleeHelper.d.ts +11 -11
- package/dist/types/contract/DODOCpProxy.d.ts +10 -10
- package/dist/types/contract/DODOCpProxyWithoutGlobalQuota.d.ts +9 -9
- package/dist/types/contract/DODODppProxy.d.ts +14 -14
- package/dist/types/contract/DODODspProxy.d.ts +23 -23
- package/dist/types/contract/DODODspProxyWithoutGSP.d.ts +14 -14
- package/dist/types/contract/DODOIncentive.d.ts +6 -6
- package/dist/types/contract/DODOMineV2Factory.d.ts +4 -4
- package/dist/types/contract/DODOMineV3Proxy.d.ts +9 -9
- package/dist/types/contract/DODOMineV3ProxyWithoutPlatform.d.ts +8 -8
- package/dist/types/contract/DODONFT.d.ts +10 -10
- package/dist/types/contract/DODONFT1155.d.ts +11 -11
- package/dist/types/contract/DODONFTApprove.d.ts +8 -8
- package/dist/types/contract/DODONFTPoolProxy.d.ts +24 -24
- package/dist/types/contract/DODONFTProxy.d.ts +6 -6
- package/dist/types/contract/DODOStarterProxy.d.ts +4 -4
- package/dist/types/contract/DODOV1.d.ts +41 -41
- package/dist/types/contract/DODOV1Proxy.d.ts +10 -10
- package/dist/types/contract/DODOV2Proxy02.d.ts +75 -75
- package/dist/types/contract/DPPAdvanced.d.ts +17 -17
- package/dist/types/contract/DPPAdvancedAdmin.d.ts +12 -12
- package/dist/types/contract/DPPFactory.d.ts +4 -4
- package/dist/types/contract/DSP.d.ts +22 -22
- package/dist/types/contract/DSPFactory.d.ts +4 -4
- package/dist/types/contract/DVM.d.ts +22 -22
- package/dist/types/contract/DVMFactory.d.ts +4 -4
- package/dist/types/contract/ERC20.d.ts +8 -8
- package/dist/types/contract/ERC20MineV3.d.ts +19 -19
- package/dist/types/contract/ERC20V3Factory.d.ts +15 -15
- package/dist/types/contract/FeeRateDIP3Impl.d.ts +8 -8
- package/dist/types/contract/GSP.d.ts +34 -34
- package/dist/types/contract/GSPFactory.d.ts +6 -6
- package/dist/types/contract/InitializableERC20.d.ts +9 -9
- package/dist/types/contract/LimitOrder.d.ts +19 -19
- package/dist/types/contract/LimitOrderBot.d.ts +5 -5
- package/dist/types/contract/UniswapV2Factory.d.ts +4 -4
- package/dist/types/contract/UniswapV2Router02.d.ts +94 -94
- package/dist/types/contract/dodoTeam.d.ts +24 -24
- package/dist/types/contract/vDODOToken.d.ts +18 -18
- package/package.json +2 -2
- package/src/contract/BuyoutModel.ts +10 -10
- package/src/contract/CP.ts +5 -5
- package/src/contract/CrowdPoolingFactory.ts +15 -15
- package/src/contract/CustomERC20.ts +11 -11
- package/src/contract/CustomMintableERC20.ts +15 -15
- package/src/contract/D3Proxy.ts +20 -20
- package/src/contract/D3Vault.ts +31 -31
- package/src/contract/DODOApprove.ts +2 -2
- package/src/contract/DODOApproveProxy.ts +2 -2
- package/src/contract/DODOCalleeHelper.ts +11 -11
- package/src/contract/DODOCpProxy.ts +10 -10
- package/src/contract/DODOCpProxyWithoutGlobalQuota.ts +9 -9
- package/src/contract/DODODppProxy.ts +14 -14
- package/src/contract/DODODspProxy.ts +23 -23
- package/src/contract/DODODspProxyWithoutGSP.ts +14 -14
- package/src/contract/DODOIncentive.ts +6 -6
- package/src/contract/DODOMineV2Factory.ts +4 -4
- package/src/contract/DODOMineV3Proxy.ts +9 -9
- package/src/contract/DODOMineV3ProxyWithoutPlatform.ts +8 -8
- package/src/contract/DODONFT.ts +10 -10
- package/src/contract/DODONFT1155.ts +11 -11
- package/src/contract/DODONFTApprove.ts +8 -8
- package/src/contract/DODONFTPoolProxy.ts +24 -24
- package/src/contract/DODONFTProxy.ts +6 -6
- package/src/contract/DODOStarterProxy.ts +4 -4
- package/src/contract/DODOV1.ts +41 -41
- package/src/contract/DODOV1Proxy.ts +10 -10
- package/src/contract/DODOV2Proxy02.ts +75 -75
- package/src/contract/DPPAdvanced.ts +17 -17
- package/src/contract/DPPAdvancedAdmin.ts +12 -12
- package/src/contract/DPPFactory.ts +4 -4
- package/src/contract/DSP.ts +22 -22
- package/src/contract/DSPFactory.ts +4 -4
- package/src/contract/DVM.ts +22 -22
- package/src/contract/DVMFactory.ts +4 -4
- package/src/contract/ERC20.ts +8 -8
- package/src/contract/ERC20MineV3.ts +19 -19
- package/src/contract/ERC20V3Factory.ts +15 -15
- package/src/contract/FeeRateDIP3Impl.ts +8 -8
- package/src/contract/GSP.ts +34 -34
- package/src/contract/GSPFactory.ts +6 -6
- package/src/contract/InitializableERC20.ts +9 -9
- package/src/contract/LimitOrder.ts +9 -9
- package/src/contract/LimitOrderBot.ts +5 -5
- package/src/contract/UniswapV2Factory.ts +4 -4
- package/src/contract/UniswapV2Router02.ts +84 -84
- package/src/contract/dodoTeam.ts +24 -24
- package/src/contract/vDODOToken.ts +18 -18
|
@@ -196,16 +196,16 @@ export declare function fetchVDODOTokenUserInfo(chainId: number, __input1: strin
|
|
|
196
196
|
/**
|
|
197
197
|
* encode approve
|
|
198
198
|
* @param {string} spender - address
|
|
199
|
-
* @param {
|
|
199
|
+
* @param {string} vDODOAmount - uint256
|
|
200
200
|
* @returns {string} encode data
|
|
201
201
|
*/
|
|
202
|
-
export declare function encodeVDODOTokenApprove(spender: string, vDODOAmount:
|
|
202
|
+
export declare function encodeVDODOTokenApprove(spender: string, vDODOAmount: string): any;
|
|
203
203
|
/**
|
|
204
204
|
* encode changePerReward
|
|
205
|
-
* @param {
|
|
205
|
+
* @param {string} dodoPerBlock - uint256
|
|
206
206
|
* @returns {string} encode data
|
|
207
207
|
*/
|
|
208
|
-
export declare function encodeVDODOTokenChangePerReward(dodoPerBlock:
|
|
208
|
+
export declare function encodeVDODOTokenChangePerReward(dodoPerBlock: string): any;
|
|
209
209
|
/**
|
|
210
210
|
* encode claimOwnership
|
|
211
211
|
|
|
@@ -214,10 +214,10 @@ export declare function encodeVDODOTokenChangePerReward(dodoPerBlock: number): a
|
|
|
214
214
|
export declare function encodeVDODOTokenClaimOwnership(): any;
|
|
215
215
|
/**
|
|
216
216
|
* encode donate
|
|
217
|
-
* @param {
|
|
217
|
+
* @param {string} dodoAmount - uint256
|
|
218
218
|
* @returns {string} encode data
|
|
219
219
|
*/
|
|
220
|
-
export declare function encodeVDODOTokenDonate(dodoAmount:
|
|
220
|
+
export declare function encodeVDODOTokenDonate(dodoAmount: string): any;
|
|
221
221
|
/**
|
|
222
222
|
* encode emergencyWithdraw
|
|
223
223
|
|
|
@@ -232,24 +232,24 @@ export declare function encodeVDODOTokenEmergencyWithdraw(): any;
|
|
|
232
232
|
export declare function encodeVDODOTokenInitOwner(newOwner: string): any;
|
|
233
233
|
/**
|
|
234
234
|
* encode mint
|
|
235
|
-
* @param {
|
|
235
|
+
* @param {string} dodoAmount - uint256
|
|
236
236
|
* @param {string} superiorAddress - address
|
|
237
237
|
* @returns {string} encode data
|
|
238
238
|
*/
|
|
239
|
-
export declare function encodeVDODOTokenMint(dodoAmount:
|
|
239
|
+
export declare function encodeVDODOTokenMint(dodoAmount: string, superiorAddress: string): any;
|
|
240
240
|
/**
|
|
241
241
|
* encode preDepositedBlockReward
|
|
242
|
-
* @param {
|
|
242
|
+
* @param {string} dodoAmount - uint256
|
|
243
243
|
* @returns {string} encode data
|
|
244
244
|
*/
|
|
245
|
-
export declare function encodeVDODOTokenPreDepositedBlockReward(dodoAmount:
|
|
245
|
+
export declare function encodeVDODOTokenPreDepositedBlockReward(dodoAmount: string): any;
|
|
246
246
|
/**
|
|
247
247
|
* encode redeem
|
|
248
|
-
* @param {
|
|
248
|
+
* @param {string} vdodoAmount - uint256
|
|
249
249
|
* @param {boolean} all - bool
|
|
250
250
|
* @returns {string} encode data
|
|
251
251
|
*/
|
|
252
|
-
export declare function encodeVDODOTokenRedeem(vdodoAmount:
|
|
252
|
+
export declare function encodeVDODOTokenRedeem(vdodoAmount: string, all: boolean): any;
|
|
253
253
|
/**
|
|
254
254
|
* encode setCantransfer
|
|
255
255
|
* @param {boolean} allowed - bool
|
|
@@ -259,18 +259,18 @@ export declare function encodeVDODOTokenSetCantransfer(allowed: boolean): any;
|
|
|
259
259
|
/**
|
|
260
260
|
* encode transfer
|
|
261
261
|
* @param {string} to - address
|
|
262
|
-
* @param {
|
|
262
|
+
* @param {string} vDODOAmount - uint256
|
|
263
263
|
* @returns {string} encode data
|
|
264
264
|
*/
|
|
265
|
-
export declare function encodeVDODOTokenTransfer(to: string, vDODOAmount:
|
|
265
|
+
export declare function encodeVDODOTokenTransfer(to: string, vDODOAmount: string): any;
|
|
266
266
|
/**
|
|
267
267
|
* encode transferFrom
|
|
268
268
|
* @param {string} from - address
|
|
269
269
|
* @param {string} to - address
|
|
270
|
-
* @param {
|
|
270
|
+
* @param {string} vDODOAmount - uint256
|
|
271
271
|
* @returns {string} encode data
|
|
272
272
|
*/
|
|
273
|
-
export declare function encodeVDODOTokenTransferFrom(from: string, to: string, vDODOAmount:
|
|
273
|
+
export declare function encodeVDODOTokenTransferFrom(from: string, to: string, vDODOAmount: string): any;
|
|
274
274
|
/**
|
|
275
275
|
* encode transferOwnership
|
|
276
276
|
* @param {string} newOwner - address
|
|
@@ -285,10 +285,10 @@ export declare function encodeVDODOTokenTransferOwnership(newOwner: string): any
|
|
|
285
285
|
export declare function encodeVDODOTokenUpdateDODOCirculationHelper(helper: string): any;
|
|
286
286
|
/**
|
|
287
287
|
* encode updateDODOFeeBurnRatio
|
|
288
|
-
* @param {
|
|
288
|
+
* @param {string} dodoFeeBurnRatio - uint256
|
|
289
289
|
* @returns {string} encode data
|
|
290
290
|
*/
|
|
291
|
-
export declare function encodeVDODOTokenUpdateDODOFeeBurnRatio(dodoFeeBurnRatio:
|
|
291
|
+
export declare function encodeVDODOTokenUpdateDODOFeeBurnRatio(dodoFeeBurnRatio: string): any;
|
|
292
292
|
/**
|
|
293
293
|
* encode updateGovernance
|
|
294
294
|
* @param {string} governance - address
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/dodo-contract-request",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"contract:generate": "env tsx --env-file-if-exists=.env scripts/contract-generate",
|
|
11
11
|
"prerelease": "yarn run build",
|
|
12
12
|
"release": "semantic-release",
|
|
13
|
-
"type-check": "tsc --noEmit"
|
|
13
|
+
"type-check": "tsc --noEmit "
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
@@ -92,12 +92,12 @@ export function fetchBuyoutModelGetBuyoutStatus(chainId: number, fragAddr: strin
|
|
|
92
92
|
/**
|
|
93
93
|
* encode addFragInfo
|
|
94
94
|
* @param {string} fragAddr - address
|
|
95
|
-
* @param {
|
|
96
|
-
* @param {
|
|
95
|
+
* @param {string} minFrag - uint256
|
|
96
|
+
* @param {string} maxFrag - uint256
|
|
97
97
|
* @param {string} buyoutAddr - address
|
|
98
98
|
* @returns {string} encode data
|
|
99
99
|
*/
|
|
100
|
-
export function encodeBuyoutModelAddFragInfo(fragAddr: string, minFrag:
|
|
100
|
+
export function encodeBuyoutModelAddFragInfo(fragAddr: string, minFrag: string, maxFrag: string, buyoutAddr: string) {
|
|
101
101
|
const __encodeData = defaultAbiCoder.encode(["address","uint256","uint256","address"], [fragAddr,minFrag,maxFrag,buyoutAddr]);
|
|
102
102
|
return hexlify(concat(['0x26b7abf3', __encodeData]));
|
|
103
103
|
}
|
|
@@ -125,24 +125,24 @@ export function encodeBuyoutModelInitOwner(newOwner: string) {
|
|
|
125
125
|
/**
|
|
126
126
|
* encode setFragInfo
|
|
127
127
|
* @param {string} fragAddr - address
|
|
128
|
-
* @param {
|
|
129
|
-
* @param {
|
|
128
|
+
* @param {string} minFrag - uint256
|
|
129
|
+
* @param {string} maxFrag - uint256
|
|
130
130
|
* @param {string} buyoutAddr - address
|
|
131
131
|
* @returns {string} encode data
|
|
132
132
|
*/
|
|
133
|
-
export function encodeBuyoutModelSetFragInfo(fragAddr: string, minFrag:
|
|
133
|
+
export function encodeBuyoutModelSetFragInfo(fragAddr: string, minFrag: string, maxFrag: string, buyoutAddr: string) {
|
|
134
134
|
const __encodeData = defaultAbiCoder.encode(["address","uint256","uint256","address"], [fragAddr,minFrag,maxFrag,buyoutAddr]);
|
|
135
135
|
return hexlify(concat(['0x5a1d590f', __encodeData]));
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* encode setGlobalParam
|
|
140
|
-
* @param {
|
|
141
|
-
* @param {
|
|
142
|
-
* @param {
|
|
140
|
+
* @param {string} minFrag - uint256
|
|
141
|
+
* @param {string} maxFrag - uint256
|
|
142
|
+
* @param {string} buyoutFee - uint256
|
|
143
143
|
* @returns {string} encode data
|
|
144
144
|
*/
|
|
145
|
-
export function encodeBuyoutModelSetGlobalParam(minFrag:
|
|
145
|
+
export function encodeBuyoutModelSetGlobalParam(minFrag: string, maxFrag: string, buyoutFee: string) {
|
|
146
146
|
const __encodeData = defaultAbiCoder.encode(["uint256","uint256","uint256"], [minFrag,maxFrag,buyoutFee]);
|
|
147
147
|
return hexlify(concat(['0xe8335232', __encodeData]));
|
|
148
148
|
}
|
package/src/contract/CP.ts
CHANGED
|
@@ -449,11 +449,11 @@ export function encodeCPBidderClaim(to: string, data: string) {
|
|
|
449
449
|
/**
|
|
450
450
|
* encode cancel
|
|
451
451
|
* @param {string} to - address
|
|
452
|
-
* @param {
|
|
452
|
+
* @param {string} amount - uint256
|
|
453
453
|
* @param {string} data - bytes
|
|
454
454
|
* @returns {string} encode data
|
|
455
455
|
*/
|
|
456
|
-
export function encodeCPCancel(to: string, amount:
|
|
456
|
+
export function encodeCPCancel(to: string, amount: string, data: string) {
|
|
457
457
|
const __encodeData = defaultAbiCoder.encode(["address","uint256","bytes"], [to,amount,data]);
|
|
458
458
|
return hexlify(concat(['0xe44f82db', __encodeData]));
|
|
459
459
|
}
|
|
@@ -491,12 +491,12 @@ export function encodeCPEmergencySettle() {
|
|
|
491
491
|
/**
|
|
492
492
|
* encode init
|
|
493
493
|
* @param {Array<string>} addressList - address[]
|
|
494
|
-
* @param {Array<
|
|
495
|
-
* @param {Array<
|
|
494
|
+
* @param {Array<string>} timeLine - uint256[]
|
|
495
|
+
* @param {Array<string>} valueList - uint256[]
|
|
496
496
|
* @param {boolean} isOpenTWAP - bool
|
|
497
497
|
* @returns {string} encode data
|
|
498
498
|
*/
|
|
499
|
-
export function encodeCPInit(addressList: Array<string>, timeLine: Array<
|
|
499
|
+
export function encodeCPInit(addressList: Array<string>, timeLine: Array<string>, valueList: Array<string>, isOpenTWAP: boolean) {
|
|
500
500
|
const __encodeData = defaultAbiCoder.encode(["address[]","uint256[]","uint256[]","bool"], [addressList,timeLine,valueList,isOpenTWAP]);
|
|
501
501
|
return hexlify(concat(['0x83ba7866', __encodeData]));
|
|
502
502
|
}
|
|
@@ -296,12 +296,12 @@ export function encodeCrowdPoolingFactoryCreateCrowdPooling() {
|
|
|
296
296
|
* @param {string} creator - address
|
|
297
297
|
* @param {string} baseToken - address
|
|
298
298
|
* @param {string} quoteToken - address
|
|
299
|
-
* @param {Array<
|
|
300
|
-
* @param {Array<
|
|
299
|
+
* @param {Array<string>} timeLine - uint256[]
|
|
300
|
+
* @param {Array<string>} valueList - uint256[]
|
|
301
301
|
* @param {boolean} isOpenTWAP - bool
|
|
302
302
|
* @returns {string} encode data
|
|
303
303
|
*/
|
|
304
|
-
export function encodeCrowdPoolingFactoryInitCrowdPooling(cpAddress: string, creator: string, baseToken: string, quoteToken: string, timeLine: Array<
|
|
304
|
+
export function encodeCrowdPoolingFactoryInitCrowdPooling(cpAddress: string, creator: string, baseToken: string, quoteToken: string, timeLine: Array<string>, valueList: Array<string>, isOpenTWAP: boolean) {
|
|
305
305
|
const __encodeData = defaultAbiCoder.encode(["address","address","address","address","uint256[]","uint256[]","bool"], [cpAddress,creator,baseToken,quoteToken,timeLine,valueList,isOpenTWAP]);
|
|
306
306
|
return hexlify(concat(['0xecfc2db0', __encodeData]));
|
|
307
307
|
}
|
|
@@ -318,60 +318,60 @@ export function encodeCrowdPoolingFactoryInitOwner(newOwner: string) {
|
|
|
318
318
|
|
|
319
319
|
/**
|
|
320
320
|
* encode setCalmDuration
|
|
321
|
-
* @param {
|
|
321
|
+
* @param {string} _newCalmDuration - uint256
|
|
322
322
|
* @returns {string} encode data
|
|
323
323
|
*/
|
|
324
|
-
export function encodeCrowdPoolingFactorySetCalmDuration(_newCalmDuration:
|
|
324
|
+
export function encodeCrowdPoolingFactorySetCalmDuration(_newCalmDuration: string) {
|
|
325
325
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [_newCalmDuration]);
|
|
326
326
|
return hexlify(concat(['0x07b8a636', __encodeData]));
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
330
|
* encode setCapRatio
|
|
331
|
-
* @param {
|
|
331
|
+
* @param {string} _newCapRatio - uint256
|
|
332
332
|
* @returns {string} encode data
|
|
333
333
|
*/
|
|
334
|
-
export function encodeCrowdPoolingFactorySetCapRatio(_newCapRatio:
|
|
334
|
+
export function encodeCrowdPoolingFactorySetCapRatio(_newCapRatio: string) {
|
|
335
335
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [_newCapRatio]);
|
|
336
336
|
return hexlify(concat(['0xc06fe4ab', __encodeData]));
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
/**
|
|
340
340
|
* encode setCliffRate
|
|
341
|
-
* @param {
|
|
341
|
+
* @param {string} _newCliffRate - uint256
|
|
342
342
|
* @returns {string} encode data
|
|
343
343
|
*/
|
|
344
|
-
export function encodeCrowdPoolingFactorySetCliffRate(_newCliffRate:
|
|
344
|
+
export function encodeCrowdPoolingFactorySetCliffRate(_newCliffRate: string) {
|
|
345
345
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [_newCliffRate]);
|
|
346
346
|
return hexlify(concat(['0x4c59de66', __encodeData]));
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
/**
|
|
350
350
|
* encode setFreezeDuration
|
|
351
|
-
* @param {
|
|
351
|
+
* @param {string} _newFreeDuration - uint256
|
|
352
352
|
* @returns {string} encode data
|
|
353
353
|
*/
|
|
354
|
-
export function encodeCrowdPoolingFactorySetFreezeDuration(_newFreeDuration:
|
|
354
|
+
export function encodeCrowdPoolingFactorySetFreezeDuration(_newFreeDuration: string) {
|
|
355
355
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [_newFreeDuration]);
|
|
356
356
|
return hexlify(concat(['0x6ca2aa95', __encodeData]));
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
/**
|
|
360
360
|
* encode setK
|
|
361
|
-
* @param {
|
|
361
|
+
* @param {string} _newK - uint256
|
|
362
362
|
* @returns {string} encode data
|
|
363
363
|
*/
|
|
364
|
-
export function encodeCrowdPoolingFactorySetK(_newK:
|
|
364
|
+
export function encodeCrowdPoolingFactorySetK(_newK: string) {
|
|
365
365
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [_newK]);
|
|
366
366
|
return hexlify(concat(['0x67de8be9', __encodeData]));
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
/**
|
|
370
370
|
* encode setVestDuration
|
|
371
|
-
* @param {
|
|
371
|
+
* @param {string} _newVestDuration - uint256
|
|
372
372
|
* @returns {string} encode data
|
|
373
373
|
*/
|
|
374
|
-
export function encodeCrowdPoolingFactorySetVestDuration(_newVestDuration:
|
|
374
|
+
export function encodeCrowdPoolingFactorySetVestDuration(_newVestDuration: string) {
|
|
375
375
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [_newVestDuration]);
|
|
376
376
|
return hexlify(concat(['0x5568587a', __encodeData]));
|
|
377
377
|
}
|
|
@@ -152,10 +152,10 @@ export function encodeCustomERC20AbandonOwnership(zeroAddress: string) {
|
|
|
152
152
|
/**
|
|
153
153
|
* encode approve
|
|
154
154
|
* @param {string} spender - address
|
|
155
|
-
* @param {
|
|
155
|
+
* @param {string} amount - uint256
|
|
156
156
|
* @returns {string} encode data
|
|
157
157
|
*/
|
|
158
|
-
export function encodeCustomERC20Approve(spender: string, amount:
|
|
158
|
+
export function encodeCustomERC20Approve(spender: string, amount: string) {
|
|
159
159
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [spender,amount]);
|
|
160
160
|
return hexlify(concat(['0x095ea7b3', __encodeData]));
|
|
161
161
|
}
|
|
@@ -183,16 +183,16 @@ export function encodeCustomERC20ClaimOwnership() {
|
|
|
183
183
|
/**
|
|
184
184
|
* encode init
|
|
185
185
|
* @param {string} _creator - address
|
|
186
|
-
* @param {
|
|
186
|
+
* @param {string} _totalSupply - uint256
|
|
187
187
|
* @param {string} _name - string
|
|
188
188
|
* @param {string} _symbol - string
|
|
189
|
-
* @param {
|
|
190
|
-
* @param {
|
|
191
|
-
* @param {
|
|
189
|
+
* @param {string} _decimals - uint8
|
|
190
|
+
* @param {string} _tradeBurnRatio - uint256
|
|
191
|
+
* @param {string} _tradeFeeRatio - uint256
|
|
192
192
|
* @param {string} _team - address
|
|
193
193
|
* @returns {string} encode data
|
|
194
194
|
*/
|
|
195
|
-
export function encodeCustomERC20Init(_creator: string, _totalSupply:
|
|
195
|
+
export function encodeCustomERC20Init(_creator: string, _totalSupply: string, _name: string, _symbol: string, _decimals: string, _tradeBurnRatio: string, _tradeFeeRatio: string, _team: string) {
|
|
196
196
|
const __encodeData = defaultAbiCoder.encode(["address","uint256","string","string","uint8","uint256","uint256","address"], [_creator,_totalSupply,_name,_symbol,_decimals,_tradeBurnRatio,_tradeFeeRatio,_team]);
|
|
197
197
|
return hexlify(concat(['0x4ca60825', __encodeData]));
|
|
198
198
|
}
|
|
@@ -210,10 +210,10 @@ export function encodeCustomERC20InitOwner(newOwner: string) {
|
|
|
210
210
|
/**
|
|
211
211
|
* encode transfer
|
|
212
212
|
* @param {string} to - address
|
|
213
|
-
* @param {
|
|
213
|
+
* @param {string} amount - uint256
|
|
214
214
|
* @returns {string} encode data
|
|
215
215
|
*/
|
|
216
|
-
export function encodeCustomERC20Transfer(to: string, amount:
|
|
216
|
+
export function encodeCustomERC20Transfer(to: string, amount: string) {
|
|
217
217
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [to,amount]);
|
|
218
218
|
return hexlify(concat(['0xa9059cbb', __encodeData]));
|
|
219
219
|
}
|
|
@@ -222,10 +222,10 @@ export function encodeCustomERC20Transfer(to: string, amount: number) {
|
|
|
222
222
|
* encode transferFrom
|
|
223
223
|
* @param {string} from - address
|
|
224
224
|
* @param {string} to - address
|
|
225
|
-
* @param {
|
|
225
|
+
* @param {string} amount - uint256
|
|
226
226
|
* @returns {string} encode data
|
|
227
227
|
*/
|
|
228
|
-
export function encodeCustomERC20TransferFrom(from: string, to: string, amount:
|
|
228
|
+
export function encodeCustomERC20TransferFrom(from: string, to: string, amount: string) {
|
|
229
229
|
const __encodeData = defaultAbiCoder.encode(["address","address","uint256"], [from,to,amount]);
|
|
230
230
|
return hexlify(concat(['0x23b872dd', __encodeData]));
|
|
231
231
|
}
|
|
@@ -152,20 +152,20 @@ export function encodeCustomMintableERC20AbandonOwnership(zeroAddress: string) {
|
|
|
152
152
|
/**
|
|
153
153
|
* encode approve
|
|
154
154
|
* @param {string} spender - address
|
|
155
|
-
* @param {
|
|
155
|
+
* @param {string} amount - uint256
|
|
156
156
|
* @returns {string} encode data
|
|
157
157
|
*/
|
|
158
|
-
export function encodeCustomMintableERC20Approve(spender: string, amount:
|
|
158
|
+
export function encodeCustomMintableERC20Approve(spender: string, amount: string) {
|
|
159
159
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [spender,amount]);
|
|
160
160
|
return hexlify(concat(['0x095ea7b3', __encodeData]));
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
* encode burn
|
|
165
|
-
* @param {
|
|
165
|
+
* @param {string} value - uint256
|
|
166
166
|
* @returns {string} encode data
|
|
167
167
|
*/
|
|
168
|
-
export function encodeCustomMintableERC20Burn(value:
|
|
168
|
+
export function encodeCustomMintableERC20Burn(value: string) {
|
|
169
169
|
const __encodeData = defaultAbiCoder.encode(["uint256"], [value]);
|
|
170
170
|
return hexlify(concat(['0x42966c68', __encodeData]));
|
|
171
171
|
}
|
|
@@ -193,16 +193,16 @@ export function encodeCustomMintableERC20ClaimOwnership() {
|
|
|
193
193
|
/**
|
|
194
194
|
* encode init
|
|
195
195
|
* @param {string} _creator - address
|
|
196
|
-
* @param {
|
|
196
|
+
* @param {string} _initSupply - uint256
|
|
197
197
|
* @param {string} _name - string
|
|
198
198
|
* @param {string} _symbol - string
|
|
199
|
-
* @param {
|
|
200
|
-
* @param {
|
|
201
|
-
* @param {
|
|
199
|
+
* @param {string} _decimals - uint8
|
|
200
|
+
* @param {string} _tradeBurnRatio - uint256
|
|
201
|
+
* @param {string} _tradeFeeRatio - uint256
|
|
202
202
|
* @param {string} _team - address
|
|
203
203
|
* @returns {string} encode data
|
|
204
204
|
*/
|
|
205
|
-
export function encodeCustomMintableERC20Init(_creator: string, _initSupply:
|
|
205
|
+
export function encodeCustomMintableERC20Init(_creator: string, _initSupply: string, _name: string, _symbol: string, _decimals: string, _tradeBurnRatio: string, _tradeFeeRatio: string, _team: string) {
|
|
206
206
|
const __encodeData = defaultAbiCoder.encode(["address","uint256","string","string","uint8","uint256","uint256","address"], [_creator,_initSupply,_name,_symbol,_decimals,_tradeBurnRatio,_tradeFeeRatio,_team]);
|
|
207
207
|
return hexlify(concat(['0x4ca60825', __encodeData]));
|
|
208
208
|
}
|
|
@@ -220,10 +220,10 @@ export function encodeCustomMintableERC20InitOwner(newOwner: string) {
|
|
|
220
220
|
/**
|
|
221
221
|
* encode mint
|
|
222
222
|
* @param {string} user - address
|
|
223
|
-
* @param {
|
|
223
|
+
* @param {string} value - uint256
|
|
224
224
|
* @returns {string} encode data
|
|
225
225
|
*/
|
|
226
|
-
export function encodeCustomMintableERC20Mint(user: string, value:
|
|
226
|
+
export function encodeCustomMintableERC20Mint(user: string, value: string) {
|
|
227
227
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [user,value]);
|
|
228
228
|
return hexlify(concat(['0x40c10f19', __encodeData]));
|
|
229
229
|
}
|
|
@@ -231,10 +231,10 @@ export function encodeCustomMintableERC20Mint(user: string, value: number) {
|
|
|
231
231
|
/**
|
|
232
232
|
* encode transfer
|
|
233
233
|
* @param {string} to - address
|
|
234
|
-
* @param {
|
|
234
|
+
* @param {string} amount - uint256
|
|
235
235
|
* @returns {string} encode data
|
|
236
236
|
*/
|
|
237
|
-
export function encodeCustomMintableERC20Transfer(to: string, amount:
|
|
237
|
+
export function encodeCustomMintableERC20Transfer(to: string, amount: string) {
|
|
238
238
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [to,amount]);
|
|
239
239
|
return hexlify(concat(['0xa9059cbb', __encodeData]));
|
|
240
240
|
}
|
|
@@ -243,10 +243,10 @@ export function encodeCustomMintableERC20Transfer(to: string, amount: number) {
|
|
|
243
243
|
* encode transferFrom
|
|
244
244
|
* @param {string} from - address
|
|
245
245
|
* @param {string} to - address
|
|
246
|
-
* @param {
|
|
246
|
+
* @param {string} amount - uint256
|
|
247
247
|
* @returns {string} encode data
|
|
248
248
|
*/
|
|
249
|
-
export function encodeCustomMintableERC20TransferFrom(from: string, to: string, amount:
|
|
249
|
+
export function encodeCustomMintableERC20TransferFrom(from: string, to: string, amount: string) {
|
|
250
250
|
const __encodeData = defaultAbiCoder.encode(["address","address","uint256"], [from,to,amount]);
|
|
251
251
|
return hexlify(concat(['0x23b872dd', __encodeData]));
|
|
252
252
|
}
|
package/src/contract/D3Proxy.ts
CHANGED
|
@@ -67,13 +67,13 @@ export function fetchD3Proxy_WETH_(chainId: number) {
|
|
|
67
67
|
* @param {string} to - address
|
|
68
68
|
* @param {string} fromToken - address
|
|
69
69
|
* @param {string} toToken - address
|
|
70
|
-
* @param {
|
|
71
|
-
* @param {
|
|
70
|
+
* @param {string} quoteAmount - uint256
|
|
71
|
+
* @param {string} maxPayAmount - uint256
|
|
72
72
|
* @param {string} data - bytes
|
|
73
|
-
* @param {
|
|
73
|
+
* @param {string} deadLine - uint256
|
|
74
74
|
* @returns {string} encode data
|
|
75
75
|
*/
|
|
76
|
-
export function encodeD3ProxyBuyTokens(pool: string, to: string, fromToken: string, toToken: string, quoteAmount:
|
|
76
|
+
export function encodeD3ProxyBuyTokens(pool: string, to: string, fromToken: string, toToken: string, quoteAmount: string, maxPayAmount: string, data: string, deadLine: string) {
|
|
77
77
|
const __encodeData = defaultAbiCoder.encode(["address","address","address","address","uint256","uint256","bytes","uint256"], [pool,to,fromToken,toToken,quoteAmount,maxPayAmount,data,deadLine]);
|
|
78
78
|
return hexlify(concat(['0xbe223e53', __encodeData]));
|
|
79
79
|
}
|
|
@@ -81,11 +81,11 @@ export function encodeD3ProxyBuyTokens(pool: string, to: string, fromToken: stri
|
|
|
81
81
|
/**
|
|
82
82
|
* encode d3MMSwapCallBack
|
|
83
83
|
* @param {string} token - address
|
|
84
|
-
* @param {
|
|
84
|
+
* @param {string} value - uint256
|
|
85
85
|
* @param {string} _data - bytes
|
|
86
86
|
* @returns {string} encode data
|
|
87
87
|
*/
|
|
88
|
-
export function encodeD3ProxyD3MMSwapCallBack(token: string, value:
|
|
88
|
+
export function encodeD3ProxyD3MMSwapCallBack(token: string, value: string, _data: string) {
|
|
89
89
|
const __encodeData = defaultAbiCoder.encode(["address","uint256","bytes"], [token,value,_data]);
|
|
90
90
|
return hexlify(concat(['0x3e88c8ab', __encodeData]));
|
|
91
91
|
}
|
|
@@ -94,10 +94,10 @@ export function encodeD3ProxyD3MMSwapCallBack(token: string, value: number, _dat
|
|
|
94
94
|
* encode makerDeposit
|
|
95
95
|
* @param {string} pool - address
|
|
96
96
|
* @param {string} token - address
|
|
97
|
-
* @param {
|
|
97
|
+
* @param {string} amount - uint256
|
|
98
98
|
* @returns {string} encode data
|
|
99
99
|
*/
|
|
100
|
-
export function encodeD3ProxyMakerDeposit(pool: string, token: string, amount:
|
|
100
|
+
export function encodeD3ProxyMakerDeposit(pool: string, token: string, amount: string) {
|
|
101
101
|
const __encodeData = defaultAbiCoder.encode(["address","address","uint256"], [pool,token,amount]);
|
|
102
102
|
return hexlify(concat(['0x1f03c7c3', __encodeData]));
|
|
103
103
|
}
|
|
@@ -128,13 +128,13 @@ export function encodeD3ProxyRefundETH() {
|
|
|
128
128
|
* @param {string} to - address
|
|
129
129
|
* @param {string} fromToken - address
|
|
130
130
|
* @param {string} toToken - address
|
|
131
|
-
* @param {
|
|
132
|
-
* @param {
|
|
131
|
+
* @param {string} fromAmount - uint256
|
|
132
|
+
* @param {string} minReceiveAmount - uint256
|
|
133
133
|
* @param {string} data - bytes
|
|
134
|
-
* @param {
|
|
134
|
+
* @param {string} deadLine - uint256
|
|
135
135
|
* @returns {string} encode data
|
|
136
136
|
*/
|
|
137
|
-
export function encodeD3ProxySellTokens(pool: string, to: string, fromToken: string, toToken: string, fromAmount:
|
|
137
|
+
export function encodeD3ProxySellTokens(pool: string, to: string, fromToken: string, toToken: string, fromAmount: string, minReceiveAmount: string, data: string, deadLine: string) {
|
|
138
138
|
const __encodeData = defaultAbiCoder.encode(["address","address","address","address","uint256","uint256","bytes","uint256"], [pool,to,fromToken,toToken,fromAmount,minReceiveAmount,data,deadLine]);
|
|
139
139
|
return hexlify(concat(['0x1d16bc3e', __encodeData]));
|
|
140
140
|
}
|
|
@@ -143,11 +143,11 @@ export function encodeD3ProxySellTokens(pool: string, to: string, fromToken: str
|
|
|
143
143
|
* encode userDeposit
|
|
144
144
|
* @param {string} user - address
|
|
145
145
|
* @param {string} token - address
|
|
146
|
-
* @param {
|
|
147
|
-
* @param {
|
|
146
|
+
* @param {string} amount - uint256
|
|
147
|
+
* @param {string} minDtokenAmount - uint256
|
|
148
148
|
* @returns {string} encode data
|
|
149
149
|
*/
|
|
150
|
-
export function encodeD3ProxyUserDeposit(user: string, token: string, amount:
|
|
150
|
+
export function encodeD3ProxyUserDeposit(user: string, token: string, amount: string, minDtokenAmount: string) {
|
|
151
151
|
const __encodeData = defaultAbiCoder.encode(["address","address","uint256","uint256"], [user,token,amount,minDtokenAmount]);
|
|
152
152
|
return hexlify(concat(['0xf2f01e47', __encodeData]));
|
|
153
153
|
}
|
|
@@ -156,11 +156,11 @@ export function encodeD3ProxyUserDeposit(user: string, token: string, amount: nu
|
|
|
156
156
|
* encode userWithdraw
|
|
157
157
|
* @param {string} to - address
|
|
158
158
|
* @param {string} token - address
|
|
159
|
-
* @param {
|
|
160
|
-
* @param {
|
|
159
|
+
* @param {string} dTokenAmount - uint256
|
|
160
|
+
* @param {string} minReceiveAmount - uint256
|
|
161
161
|
* @returns {string} encode data
|
|
162
162
|
*/
|
|
163
|
-
export function encodeD3ProxyUserWithdraw(to: string, token: string, dTokenAmount:
|
|
163
|
+
export function encodeD3ProxyUserWithdraw(to: string, token: string, dTokenAmount: string, minReceiveAmount: string) {
|
|
164
164
|
const __encodeData = defaultAbiCoder.encode(["address","address","uint256","uint256"], [to,token,dTokenAmount,minReceiveAmount]);
|
|
165
165
|
return hexlify(concat(['0x5fff4847', __encodeData]));
|
|
166
166
|
}
|
|
@@ -168,10 +168,10 @@ export function encodeD3ProxyUserWithdraw(to: string, token: string, dTokenAmoun
|
|
|
168
168
|
/**
|
|
169
169
|
* encode withdrawWETH
|
|
170
170
|
* @param {string} to - address
|
|
171
|
-
* @param {
|
|
171
|
+
* @param {string} minAmount - uint256
|
|
172
172
|
* @returns {string} encode data
|
|
173
173
|
*/
|
|
174
|
-
export function encodeD3ProxyWithdrawWETH(to: string, minAmount:
|
|
174
|
+
export function encodeD3ProxyWithdrawWETH(to: string, minAmount: string) {
|
|
175
175
|
const __encodeData = defaultAbiCoder.encode(["address","uint256"], [to,minAmount]);
|
|
176
176
|
return hexlify(concat(['0x93113b5c', __encodeData]));
|
|
177
177
|
}
|