@paraswap/dex-lib 2.16.1 → 2.16.2-pancakeswapv3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abi/uniswap-v3/UniswapV3Pool.abi.json +363 -67
- package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +119 -23
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +285 -0
- package/build/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +583 -0
- package/build/dex/index.js +2 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/uniswap-v3/config.js +38 -0
- package/build/dex/uniswap-v3/config.js.map +1 -1
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.d.ts +12 -0
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js +23 -0
- package/build/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.js.map +1 -0
- package/build/dex/uniswap-v3/types.d.ts +3 -0
- package/build/dex/uniswap-v3/types.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3-pool.d.ts +2 -1
- package/build/dex/uniswap-v3/uniswap-v3-pool.js +3 -2
- package/build/dex/uniswap-v3/uniswap-v3-pool.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3.js +6 -3
- package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/uniswap-v3/UniswapV3Pool.abi.json +363 -67
- package/src/abi/uniswap-v3/UniswapV3Quoter.abi.json +119 -23
- package/src/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json +285 -0
- package/src/abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json +583 -0
- package/src/dex/index.ts +2 -0
- package/src/dex/uniswap-v3/config.ts +42 -0
- package/src/dex/uniswap-v3/forks/pancakeswap-v3/pancakeswap-v3.ts +28 -0
- package/src/dex/uniswap-v3/types.ts +3 -0
- package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +156 -0
- package/src/dex/uniswap-v3/uniswap-v3-pool.ts +3 -2
- package/src/dex/uniswap-v3/uniswap-v3.ts +8 -2
- package/.idea/aws.xml +0 -17
- package/.idea/codeStyles/Project.xml +0 -19
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/paraswap-dex-lib.iml +0 -9
- package/.idea/runConfigurations.xml +0 -10
- package/.idea/vcs.xml +0 -6
- package/build/abi/woo-fi/WooFeeManager.abi.json +0 -318
- package/build/abi/woo-fi/WooPP.abi.json +0 -548
- package/build/abi/woo-fi/Wooracle.abi.json +0 -260
- package/build/dex/aave-v3/tokens/arbitrum.json +0 -50
- package/build/dex/aave-v3/tokens/avalanche.json +0 -74
- package/build/dex/aave-v3/tokens/fantom.json +0 -62
- package/build/dex/aave-v3/tokens/optimism.json +0 -50
- package/build/dex/aave-v3/tokens/polygon.json +0 -116
- package/build/dex/quickswap-v3.d.ts +0 -21
- package/build/dex/quickswap-v3.js +0 -40
- package/build/dex/quickswap-v3.js.map +0 -1
- package/build/dex/woo-fi/config.d.ts +0 -4
- package/build/dex/woo-fi/config.js +0 -141
- package/build/dex/woo-fi/config.js.map +0 -1
- package/build/dex/woo-fi/constants.d.ts +0 -5
- package/build/dex/woo-fi/constants.js +0 -20
- package/build/dex/woo-fi/constants.js.map +0 -1
- package/build/dex/woo-fi/types.d.ts +0 -48
- package/build/dex/woo-fi/types.js +0 -3
- package/build/dex/woo-fi/types.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-decimal-math.d.ts +0 -14
- package/build/dex/woo-fi/woo-fi-decimal-math.js +0 -42
- package/build/dex/woo-fi/woo-fi-decimal-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi-math.d.ts +0 -31
- package/build/dex/woo-fi/woo-fi-math.js +0 -300
- package/build/dex/woo-fi/woo-fi-math.js.map +0 -1
- package/build/dex/woo-fi/woo-fi.d.ts +0 -65
- package/build/dex/woo-fi/woo-fi.js +0 -480
- package/build/dex/woo-fi/woo-fi.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { UniswapV3 } from '../../uniswap-v3';
|
|
2
|
+
import { Network } from '../../../../constants';
|
|
3
|
+
import { IDexHelper } from '../../../../dex-helper';
|
|
4
|
+
import { Interface } from '@ethersproject/abi';
|
|
5
|
+
import PancakeswapV3RouterABI from '../../../../abi/uniswap-v3/pancakeswap-v3/PancakeswapV3Router.abi.json';
|
|
6
|
+
import PancakeswapV3QuoterV2ABI from '../../../../abi/uniswap-v3/pancakeswap-v3/PancakeswapV3QuoterV2.abi.json';
|
|
7
|
+
import { getDexKeysWithNetwork } from '../../../../utils';
|
|
8
|
+
import _ from 'lodash';
|
|
9
|
+
import { UniswapV3Config } from '../../config';
|
|
10
|
+
|
|
11
|
+
export class PancakeswapV3 extends UniswapV3 {
|
|
12
|
+
public static dexKeysWithNetwork: { key: string; networks: Network[] }[] =
|
|
13
|
+
getDexKeysWithNetwork(_.pick(UniswapV3Config, ['PancakeswapV3']));
|
|
14
|
+
constructor(
|
|
15
|
+
protected network: Network,
|
|
16
|
+
dexKey: string,
|
|
17
|
+
protected dexHelper: IDexHelper,
|
|
18
|
+
) {
|
|
19
|
+
super(
|
|
20
|
+
network,
|
|
21
|
+
dexKey,
|
|
22
|
+
dexHelper,
|
|
23
|
+
undefined,
|
|
24
|
+
new Interface(PancakeswapV3RouterABI),
|
|
25
|
+
new Interface(PancakeswapV3QuoterV2ABI),
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -203,3 +203,159 @@ describe('UniswapV3 E2E', () => {
|
|
|
203
203
|
);
|
|
204
204
|
});
|
|
205
205
|
});
|
|
206
|
+
|
|
207
|
+
describe('PancakeswapV3 E2E', () => {
|
|
208
|
+
const dexKey = 'PancakeswapV3';
|
|
209
|
+
|
|
210
|
+
describe('PancakeswapV3 MAINNET', () => {
|
|
211
|
+
const network = Network.MAINNET;
|
|
212
|
+
const tokens = Tokens[network];
|
|
213
|
+
const holders = Holders[network];
|
|
214
|
+
const provider = new StaticJsonRpcProvider(
|
|
215
|
+
generateConfig(network).privateHttpProvider,
|
|
216
|
+
network,
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
const tokenASymbol: string = 'USDT';
|
|
220
|
+
const tokenBSymbol: string = 'USDC';
|
|
221
|
+
const nativeTokenSymbol = NativeTokenSymbols[network];
|
|
222
|
+
|
|
223
|
+
const tokenAAmount: string = '100000000';
|
|
224
|
+
const tokenBAmount: string = '100000000';
|
|
225
|
+
const nativeTokenAmount = '1000000000000000000';
|
|
226
|
+
|
|
227
|
+
const sideToContractMethods = new Map([
|
|
228
|
+
[
|
|
229
|
+
SwapSide.SELL,
|
|
230
|
+
[
|
|
231
|
+
ContractMethod.simpleSwap,
|
|
232
|
+
ContractMethod.multiSwap,
|
|
233
|
+
ContractMethod.megaSwap,
|
|
234
|
+
],
|
|
235
|
+
],
|
|
236
|
+
[SwapSide.BUY, [ContractMethod.simpleBuy, ContractMethod.buy]],
|
|
237
|
+
]);
|
|
238
|
+
|
|
239
|
+
sideToContractMethods.forEach((contractMethods, side) =>
|
|
240
|
+
contractMethods.forEach((contractMethod: ContractMethod) => {
|
|
241
|
+
describe(`${contractMethod}`, () => {
|
|
242
|
+
it(`${network} ${side} ${contractMethod} ${nativeTokenSymbol} -> ${tokenASymbol}`, async () => {
|
|
243
|
+
await testE2E(
|
|
244
|
+
tokens[nativeTokenSymbol],
|
|
245
|
+
tokens[tokenASymbol],
|
|
246
|
+
holders[nativeTokenSymbol],
|
|
247
|
+
side === SwapSide.SELL ? nativeTokenAmount : tokenAAmount,
|
|
248
|
+
side,
|
|
249
|
+
dexKey,
|
|
250
|
+
contractMethod,
|
|
251
|
+
network,
|
|
252
|
+
provider,
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
it(`${network} ${side} ${contractMethod} ${tokenASymbol} -> ${nativeTokenSymbol}`, async () => {
|
|
256
|
+
await testE2E(
|
|
257
|
+
tokens[tokenASymbol],
|
|
258
|
+
tokens[nativeTokenSymbol],
|
|
259
|
+
holders[tokenASymbol],
|
|
260
|
+
side === SwapSide.SELL ? tokenAAmount : nativeTokenAmount,
|
|
261
|
+
side,
|
|
262
|
+
dexKey,
|
|
263
|
+
contractMethod,
|
|
264
|
+
network,
|
|
265
|
+
provider,
|
|
266
|
+
);
|
|
267
|
+
});
|
|
268
|
+
it(`${network} ${side} ${contractMethod} ${tokenASymbol} -> ${tokenBSymbol}`, async () => {
|
|
269
|
+
await testE2E(
|
|
270
|
+
tokens[tokenASymbol],
|
|
271
|
+
tokens[tokenBSymbol],
|
|
272
|
+
holders[tokenASymbol],
|
|
273
|
+
side === SwapSide.SELL ? tokenAAmount : tokenBAmount,
|
|
274
|
+
side,
|
|
275
|
+
dexKey,
|
|
276
|
+
contractMethod,
|
|
277
|
+
network,
|
|
278
|
+
provider,
|
|
279
|
+
);
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
}),
|
|
283
|
+
);
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
describe('PancakeswapV3 BSC', () => {
|
|
287
|
+
const network = Network.BSC;
|
|
288
|
+
const tokens = Tokens[network];
|
|
289
|
+
const holders = Holders[network];
|
|
290
|
+
const provider = new StaticJsonRpcProvider(
|
|
291
|
+
generateConfig(network).privateHttpProvider,
|
|
292
|
+
network,
|
|
293
|
+
);
|
|
294
|
+
|
|
295
|
+
const tokenASymbol: string = 'BUSD';
|
|
296
|
+
const tokenBSymbol: string = 'WBNB';
|
|
297
|
+
const nativeTokenSymbol = NativeTokenSymbols[network];
|
|
298
|
+
|
|
299
|
+
const tokenAAmount: string = '100000000000000000000';
|
|
300
|
+
const tokenBAmount: string = '1000000000000000000';
|
|
301
|
+
const nativeTokenAmount = '1000000000000000000';
|
|
302
|
+
|
|
303
|
+
const sideToContractMethods = new Map([
|
|
304
|
+
[
|
|
305
|
+
SwapSide.SELL,
|
|
306
|
+
[
|
|
307
|
+
ContractMethod.simpleSwap,
|
|
308
|
+
ContractMethod.multiSwap,
|
|
309
|
+
ContractMethod.megaSwap,
|
|
310
|
+
],
|
|
311
|
+
],
|
|
312
|
+
[SwapSide.BUY, [ContractMethod.simpleBuy, ContractMethod.buy]],
|
|
313
|
+
]);
|
|
314
|
+
|
|
315
|
+
sideToContractMethods.forEach((contractMethods, side) =>
|
|
316
|
+
contractMethods.forEach((contractMethod: ContractMethod) => {
|
|
317
|
+
describe(`${contractMethod}`, () => {
|
|
318
|
+
it(`${network} ${side} ${contractMethod} ${nativeTokenSymbol} -> ${tokenASymbol}`, async () => {
|
|
319
|
+
await testE2E(
|
|
320
|
+
tokens[nativeTokenSymbol],
|
|
321
|
+
tokens[tokenASymbol],
|
|
322
|
+
holders[nativeTokenSymbol],
|
|
323
|
+
side === SwapSide.SELL ? nativeTokenAmount : tokenAAmount,
|
|
324
|
+
side,
|
|
325
|
+
dexKey,
|
|
326
|
+
contractMethod,
|
|
327
|
+
network,
|
|
328
|
+
provider,
|
|
329
|
+
);
|
|
330
|
+
});
|
|
331
|
+
it(`${network} ${side} ${contractMethod} ${tokenASymbol} -> ${nativeTokenSymbol}`, async () => {
|
|
332
|
+
await testE2E(
|
|
333
|
+
tokens[tokenASymbol],
|
|
334
|
+
tokens[nativeTokenSymbol],
|
|
335
|
+
holders[tokenASymbol],
|
|
336
|
+
side === SwapSide.SELL ? tokenAAmount : nativeTokenAmount,
|
|
337
|
+
side,
|
|
338
|
+
dexKey,
|
|
339
|
+
contractMethod,
|
|
340
|
+
network,
|
|
341
|
+
provider,
|
|
342
|
+
);
|
|
343
|
+
});
|
|
344
|
+
it(`${network} ${side} ${contractMethod} ${tokenASymbol} -> ${tokenBSymbol}`, async () => {
|
|
345
|
+
await testE2E(
|
|
346
|
+
tokens[tokenASymbol],
|
|
347
|
+
tokens[tokenBSymbol],
|
|
348
|
+
holders[tokenASymbol],
|
|
349
|
+
side === SwapSide.SELL ? tokenAAmount : tokenBAmount,
|
|
350
|
+
side,
|
|
351
|
+
dexKey,
|
|
352
|
+
contractMethod,
|
|
353
|
+
network,
|
|
354
|
+
provider,
|
|
355
|
+
);
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
}),
|
|
359
|
+
);
|
|
360
|
+
});
|
|
361
|
+
});
|
|
@@ -68,7 +68,8 @@ export class UniswapV3EventPool extends StatefulEventSubscriber<PoolState> {
|
|
|
68
68
|
token1: Address,
|
|
69
69
|
logger: Logger,
|
|
70
70
|
mapKey: string = '',
|
|
71
|
-
readonly poolInitCodeHash
|
|
71
|
+
readonly poolInitCodeHash: string,
|
|
72
|
+
readonly poolDeployer?: string,
|
|
72
73
|
) {
|
|
73
74
|
super(
|
|
74
75
|
parentName,
|
|
@@ -538,7 +539,7 @@ export class UniswapV3EventPool extends StatefulEventSubscriber<PoolState> {
|
|
|
538
539
|
);
|
|
539
540
|
|
|
540
541
|
return ethers.utils.getCreate2Address(
|
|
541
|
-
this.factoryAddress,
|
|
542
|
+
this.poolDeployer ? this.poolDeployer : this.factoryAddress,
|
|
542
543
|
encodedKey,
|
|
543
544
|
this.poolInitCodeHash,
|
|
544
545
|
);
|
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
DEFAULT_ID_ERC20,
|
|
57
57
|
DEFAULT_ID_ERC20_AS_STRING,
|
|
58
58
|
} from '../../lib/tokens/types';
|
|
59
|
+
import { SolidlyConfig } from '../solidly/config';
|
|
59
60
|
|
|
60
61
|
type PoolPairsInfo = {
|
|
61
62
|
token0: Address;
|
|
@@ -80,7 +81,7 @@ export class UniswapV3
|
|
|
80
81
|
intervalTask?: NodeJS.Timeout;
|
|
81
82
|
|
|
82
83
|
public static dexKeysWithNetwork: { key: string; networks: Network[] }[] =
|
|
83
|
-
getDexKeysWithNetwork(UniswapV3Config);
|
|
84
|
+
getDexKeysWithNetwork(_.pick(UniswapV3Config, ['UniswapV3']));
|
|
84
85
|
|
|
85
86
|
logger: Logger;
|
|
86
87
|
|
|
@@ -213,6 +214,8 @@ export class UniswapV3
|
|
|
213
214
|
token1,
|
|
214
215
|
this.logger,
|
|
215
216
|
this.cacheStateKey,
|
|
217
|
+
this.config.initHash,
|
|
218
|
+
this.config.deployer,
|
|
216
219
|
);
|
|
217
220
|
|
|
218
221
|
try {
|
|
@@ -880,6 +883,9 @@ export class UniswapV3
|
|
|
880
883
|
stateMulticall: this.config.stateMulticall.toLowerCase(),
|
|
881
884
|
chunksCount: this.config.chunksCount,
|
|
882
885
|
uniswapMulticall: this.config.uniswapMulticall,
|
|
886
|
+
deployer: this.config.deployer?.toLowerCase(),
|
|
887
|
+
initHash: this.config.initHash,
|
|
888
|
+
subgraphURL: this.config.subgraphURL,
|
|
883
889
|
};
|
|
884
890
|
return newConfig;
|
|
885
891
|
}
|
|
@@ -943,7 +949,7 @@ export class UniswapV3
|
|
|
943
949
|
) {
|
|
944
950
|
try {
|
|
945
951
|
const res = await this.dexHelper.httpRequest.post(
|
|
946
|
-
|
|
952
|
+
this.config.subgraphURL,
|
|
947
953
|
{ query, variables },
|
|
948
954
|
undefined,
|
|
949
955
|
{ timeout: timeout },
|
package/.idea/aws.xml
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="accountSettings">
|
|
4
|
-
<option name="activeProfile" value="profile:default" />
|
|
5
|
-
<option name="activeRegion" value="us-east-1" />
|
|
6
|
-
<option name="recentlyUsedProfiles">
|
|
7
|
-
<list>
|
|
8
|
-
<option value="profile:default" />
|
|
9
|
-
</list>
|
|
10
|
-
</option>
|
|
11
|
-
<option name="recentlyUsedRegions">
|
|
12
|
-
<list>
|
|
13
|
-
<option value="us-east-1" />
|
|
14
|
-
</list>
|
|
15
|
-
</option>
|
|
16
|
-
</component>
|
|
17
|
-
</project>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<component name="ProjectCodeStyleConfiguration">
|
|
2
|
-
<code_scheme name="Project" version="173">
|
|
3
|
-
<ScalaCodeStyleSettings>
|
|
4
|
-
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
|
|
5
|
-
</ScalaCodeStyleSettings>
|
|
6
|
-
<TypeScriptCodeStyleSettings version="0">
|
|
7
|
-
<option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACKETS" value="true" />
|
|
8
|
-
<option name="USE_DOUBLE_QUOTES" value="false" />
|
|
9
|
-
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
|
10
|
-
</TypeScriptCodeStyleSettings>
|
|
11
|
-
<codeStyleSettings language="TypeScript">
|
|
12
|
-
<indentOptions>
|
|
13
|
-
<option name="INDENT_SIZE" value="2" />
|
|
14
|
-
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
|
15
|
-
<option name="TAB_SIZE" value="2" />
|
|
16
|
-
</indentOptions>
|
|
17
|
-
</codeStyleSettings>
|
|
18
|
-
</code_scheme>
|
|
19
|
-
</component>
|
package/.idea/misc.xml
DELETED
package/.idea/modules.xml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="ProjectModuleManager">
|
|
4
|
-
<modules>
|
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/paraswap-dex-lib.iml" filepath="$PROJECT_DIR$/.idea/paraswap-dex-lib.iml" />
|
|
6
|
-
</modules>
|
|
7
|
-
</component>
|
|
8
|
-
</project>
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="JAVA_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$" />
|
|
6
|
-
<orderEntry type="inheritedJdk" />
|
|
7
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
-
</component>
|
|
9
|
-
</module>
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project version="4">
|
|
3
|
-
<component name="RunConfigurationProducerService">
|
|
4
|
-
<option name="ignoredProducers">
|
|
5
|
-
<set>
|
|
6
|
-
<option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
|
|
7
|
-
</set>
|
|
8
|
-
</option>
|
|
9
|
-
</component>
|
|
10
|
-
</project>
|
package/.idea/vcs.xml
DELETED
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [
|
|
4
|
-
{ "internalType": "address", "name": "newQuoteToken", "type": "address" },
|
|
5
|
-
{
|
|
6
|
-
"internalType": "address",
|
|
7
|
-
"name": "newRebateManager",
|
|
8
|
-
"type": "address"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"internalType": "address",
|
|
12
|
-
"name": "newVaultManager",
|
|
13
|
-
"type": "address"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"internalType": "address",
|
|
17
|
-
"name": "newAccessManager",
|
|
18
|
-
"type": "address"
|
|
19
|
-
},
|
|
20
|
-
{ "internalType": "address", "name": "newTreasury", "type": "address" }
|
|
21
|
-
],
|
|
22
|
-
"stateMutability": "nonpayable",
|
|
23
|
-
"type": "constructor"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"anonymous": false,
|
|
27
|
-
"inputs": [
|
|
28
|
-
{
|
|
29
|
-
"indexed": true,
|
|
30
|
-
"internalType": "address",
|
|
31
|
-
"name": "token",
|
|
32
|
-
"type": "address"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"indexed": false,
|
|
36
|
-
"internalType": "uint256",
|
|
37
|
-
"name": "newFeeRate",
|
|
38
|
-
"type": "uint256"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"name": "FeeRateUpdated",
|
|
42
|
-
"type": "event"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"anonymous": false,
|
|
46
|
-
"inputs": [
|
|
47
|
-
{
|
|
48
|
-
"indexed": true,
|
|
49
|
-
"internalType": "address",
|
|
50
|
-
"name": "previousOwner",
|
|
51
|
-
"type": "address"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"indexed": true,
|
|
55
|
-
"internalType": "address",
|
|
56
|
-
"name": "newOwner",
|
|
57
|
-
"type": "address"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"name": "OwnershipTransferPrepared",
|
|
61
|
-
"type": "event"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"anonymous": false,
|
|
65
|
-
"inputs": [
|
|
66
|
-
{
|
|
67
|
-
"indexed": true,
|
|
68
|
-
"internalType": "address",
|
|
69
|
-
"name": "previousOwner",
|
|
70
|
-
"type": "address"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"indexed": true,
|
|
74
|
-
"internalType": "address",
|
|
75
|
-
"name": "newOwner",
|
|
76
|
-
"type": "address"
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"name": "OwnershipTransferred",
|
|
80
|
-
"type": "event"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"anonymous": false,
|
|
84
|
-
"inputs": [
|
|
85
|
-
{
|
|
86
|
-
"indexed": true,
|
|
87
|
-
"internalType": "address",
|
|
88
|
-
"name": "token",
|
|
89
|
-
"type": "address"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"indexed": true,
|
|
93
|
-
"internalType": "address",
|
|
94
|
-
"name": "to",
|
|
95
|
-
"type": "address"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"indexed": false,
|
|
99
|
-
"internalType": "uint256",
|
|
100
|
-
"name": "amount",
|
|
101
|
-
"type": "uint256"
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"name": "Withdraw",
|
|
105
|
-
"type": "event"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"inputs": [],
|
|
109
|
-
"name": "_NEW_OWNER_",
|
|
110
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
111
|
-
"stateMutability": "view",
|
|
112
|
-
"type": "function"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"inputs": [],
|
|
116
|
-
"name": "_OWNER_",
|
|
117
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
118
|
-
"stateMutability": "view",
|
|
119
|
-
"type": "function"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"inputs": [],
|
|
123
|
-
"name": "accessManager",
|
|
124
|
-
"outputs": [
|
|
125
|
-
{
|
|
126
|
-
"internalType": "contract IWooAccessManager",
|
|
127
|
-
"name": "",
|
|
128
|
-
"type": "address"
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
"stateMutability": "view",
|
|
132
|
-
"type": "function"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"inputs": [],
|
|
136
|
-
"name": "claimOwnership",
|
|
137
|
-
"outputs": [],
|
|
138
|
-
"stateMutability": "nonpayable",
|
|
139
|
-
"type": "function"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"inputs": [
|
|
143
|
-
{ "internalType": "uint256", "name": "amount", "type": "uint256" },
|
|
144
|
-
{ "internalType": "address", "name": "brokerAddr", "type": "address" }
|
|
145
|
-
],
|
|
146
|
-
"name": "collectFee",
|
|
147
|
-
"outputs": [],
|
|
148
|
-
"stateMutability": "nonpayable",
|
|
149
|
-
"type": "function"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"inputs": [],
|
|
153
|
-
"name": "distributeFees",
|
|
154
|
-
"outputs": [],
|
|
155
|
-
"stateMutability": "nonpayable",
|
|
156
|
-
"type": "function"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"inputs": [
|
|
160
|
-
{ "internalType": "address", "name": "token", "type": "address" },
|
|
161
|
-
{ "internalType": "address", "name": "to", "type": "address" }
|
|
162
|
-
],
|
|
163
|
-
"name": "emergencyWithdraw",
|
|
164
|
-
"outputs": [],
|
|
165
|
-
"stateMutability": "nonpayable",
|
|
166
|
-
"type": "function"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
170
|
-
"name": "feeRate",
|
|
171
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
172
|
-
"stateMutability": "view",
|
|
173
|
-
"type": "function"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"inputs": [
|
|
177
|
-
{ "internalType": "address", "name": "newOwner", "type": "address" }
|
|
178
|
-
],
|
|
179
|
-
"name": "initOwner",
|
|
180
|
-
"outputs": [],
|
|
181
|
-
"stateMutability": "nonpayable",
|
|
182
|
-
"type": "function"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"inputs": [],
|
|
186
|
-
"name": "quoteToken",
|
|
187
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
188
|
-
"stateMutability": "view",
|
|
189
|
-
"type": "function"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"inputs": [],
|
|
193
|
-
"name": "rebateAmount",
|
|
194
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
195
|
-
"stateMutability": "view",
|
|
196
|
-
"type": "function"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"inputs": [],
|
|
200
|
-
"name": "rebateManager",
|
|
201
|
-
"outputs": [
|
|
202
|
-
{
|
|
203
|
-
"internalType": "contract IWooRebateManager",
|
|
204
|
-
"name": "",
|
|
205
|
-
"type": "address"
|
|
206
|
-
}
|
|
207
|
-
],
|
|
208
|
-
"stateMutability": "view",
|
|
209
|
-
"type": "function"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"inputs": [
|
|
213
|
-
{
|
|
214
|
-
"internalType": "address",
|
|
215
|
-
"name": "newAccessManager",
|
|
216
|
-
"type": "address"
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
|
-
"name": "setAccessManager",
|
|
220
|
-
"outputs": [],
|
|
221
|
-
"stateMutability": "nonpayable",
|
|
222
|
-
"type": "function"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"inputs": [
|
|
226
|
-
{ "internalType": "address", "name": "token", "type": "address" },
|
|
227
|
-
{ "internalType": "uint256", "name": "newFeeRate", "type": "uint256" }
|
|
228
|
-
],
|
|
229
|
-
"name": "setFeeRate",
|
|
230
|
-
"outputs": [],
|
|
231
|
-
"stateMutability": "nonpayable",
|
|
232
|
-
"type": "function"
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"inputs": [
|
|
236
|
-
{
|
|
237
|
-
"internalType": "address",
|
|
238
|
-
"name": "newRebateManager",
|
|
239
|
-
"type": "address"
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
"name": "setRebateManager",
|
|
243
|
-
"outputs": [],
|
|
244
|
-
"stateMutability": "nonpayable",
|
|
245
|
-
"type": "function"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"inputs": [
|
|
249
|
-
{ "internalType": "address", "name": "newTreasury", "type": "address" }
|
|
250
|
-
],
|
|
251
|
-
"name": "setTreasury",
|
|
252
|
-
"outputs": [],
|
|
253
|
-
"stateMutability": "nonpayable",
|
|
254
|
-
"type": "function"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"inputs": [
|
|
258
|
-
{
|
|
259
|
-
"internalType": "address",
|
|
260
|
-
"name": "newVaultManager",
|
|
261
|
-
"type": "address"
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
"name": "setVaultManager",
|
|
265
|
-
"outputs": [],
|
|
266
|
-
"stateMutability": "nonpayable",
|
|
267
|
-
"type": "function"
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"inputs": [
|
|
271
|
-
{
|
|
272
|
-
"internalType": "uint256",
|
|
273
|
-
"name": "newVaultRewardRate",
|
|
274
|
-
"type": "uint256"
|
|
275
|
-
}
|
|
276
|
-
],
|
|
277
|
-
"name": "setVaultRewardRate",
|
|
278
|
-
"outputs": [],
|
|
279
|
-
"stateMutability": "nonpayable",
|
|
280
|
-
"type": "function"
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"inputs": [
|
|
284
|
-
{ "internalType": "address", "name": "newOwner", "type": "address" }
|
|
285
|
-
],
|
|
286
|
-
"name": "transferOwnership",
|
|
287
|
-
"outputs": [],
|
|
288
|
-
"stateMutability": "nonpayable",
|
|
289
|
-
"type": "function"
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
"inputs": [],
|
|
293
|
-
"name": "treasury",
|
|
294
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
295
|
-
"stateMutability": "view",
|
|
296
|
-
"type": "function"
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
"inputs": [],
|
|
300
|
-
"name": "vaultManager",
|
|
301
|
-
"outputs": [
|
|
302
|
-
{
|
|
303
|
-
"internalType": "contract IWooVaultManager",
|
|
304
|
-
"name": "",
|
|
305
|
-
"type": "address"
|
|
306
|
-
}
|
|
307
|
-
],
|
|
308
|
-
"stateMutability": "view",
|
|
309
|
-
"type": "function"
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
"inputs": [],
|
|
313
|
-
"name": "vaultRewardRate",
|
|
314
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
315
|
-
"stateMutability": "view",
|
|
316
|
-
"type": "function"
|
|
317
|
-
}
|
|
318
|
-
]
|