@swapkit/core 1.0.0-rc.12 → 1.0.0-rc.120
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/dist/index.js +7324 -0
- package/dist/index.js.map +41 -0
- package/package.json +33 -47
- package/src/__tests__/helpers.test.ts +53 -0
- package/src/aggregator/contracts/avaxGeneric.ts +50 -50
- package/src/aggregator/contracts/avaxWoofi.ts +80 -80
- package/src/aggregator/contracts/bscGeneric.ts +59 -59
- package/src/aggregator/contracts/ethGeneric.ts +50 -50
- package/src/aggregator/contracts/index.ts +30 -28
- package/src/aggregator/contracts/pancakeV2.ts +80 -80
- package/src/aggregator/contracts/pangolin.ts +65 -65
- package/src/aggregator/contracts/routers/index.ts +58 -0
- package/src/aggregator/contracts/routers/kyber.ts +402 -0
- package/src/aggregator/contracts/routers/oneinch.ts +2188 -0
- package/src/aggregator/contracts/routers/pancakeswap.ts +340 -0
- package/src/aggregator/contracts/routers/pangolin.ts +340 -0
- package/src/aggregator/contracts/routers/sushiswap.ts +340 -0
- package/src/aggregator/contracts/routers/traderJoe.ts +340 -0
- package/src/aggregator/contracts/routers/uniswapv2.ts +340 -0
- package/src/aggregator/contracts/routers/uniswapv3.ts +254 -0
- package/src/aggregator/contracts/routers/woofi.ts +171 -0
- package/src/aggregator/contracts/sushiswap.ts +65 -65
- package/src/aggregator/contracts/traderJoe.ts +65 -65
- package/src/aggregator/contracts/uniswapV2.ts +65 -65
- package/src/aggregator/contracts/uniswapV2Leg.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_100.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_10000.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_3000.ts +70 -70
- package/src/aggregator/contracts/uniswapV3_500.ts +70 -70
- package/src/aggregator/getSwapParams.ts +12 -12
- package/src/client/index.ts +206 -646
- package/src/client/old.ts +854 -0
- package/src/helpers/explorerUrls.ts +38 -0
- package/src/index.ts +6 -4
- package/src/types.ts +149 -0
- package/LICENSE +0 -201
- package/dist/index-9e36735e.cjs +0 -1
- package/dist/index-cf1865cd.js +0 -649
- package/dist/index.cjs +0 -2
- package/dist/index.d.ts +0 -216
- package/dist/index.es.js +0 -3818
- package/src/client/__tests__/helpers.test.ts +0 -69
- package/src/client/explorerUrls.ts +0 -62
- package/src/client/thornode.ts +0 -31
- package/src/client/types.ts +0 -103
package/package.json
CHANGED
|
@@ -1,40 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"author": "swapkit-oss
|
|
2
|
+
"author": "swapkit-oss",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@swapkit/
|
|
5
|
-
"@swapkit/
|
|
4
|
+
"@swapkit/helpers": "1.0.0-rc.84",
|
|
5
|
+
"@swapkit/types": "1.0.0-rc.48"
|
|
6
6
|
},
|
|
7
|
-
"description": "SwapKit
|
|
7
|
+
"description": "SwapKit - Core",
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"@
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"@internal/config": "0.0.0-internal.0",
|
|
16
|
-
"@swapkit/api": "1.0.0-rc.5",
|
|
17
|
-
"@swapkit/tokens": "1.0.0-rc.5",
|
|
18
|
-
"@swapkit/toolbox-cosmos": "1.0.0-rc.9",
|
|
19
|
-
"@swapkit/toolbox-evm": "1.0.0-rc.8",
|
|
20
|
-
"@swapkit/toolbox-utxo": "1.0.0-rc.8"
|
|
9
|
+
"@swapkit/tokens": "1.0.0-rc.45",
|
|
10
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.101",
|
|
11
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.90",
|
|
12
|
+
"@swapkit/toolbox-substrate": "1.0.0-rc.19",
|
|
13
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.92",
|
|
14
|
+
"bun-types": "1.1.1"
|
|
21
15
|
},
|
|
22
16
|
"peerDependencies": {
|
|
23
|
-
"@swapkit/
|
|
24
|
-
"@swapkit/tokens": "1.0.0-rc.
|
|
25
|
-
"@swapkit/toolbox-cosmos": "1.0.0-rc.
|
|
26
|
-
"@swapkit/toolbox-evm": "1.0.0-rc.
|
|
27
|
-
"@swapkit/toolbox-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"extends": "../../../internal/eslint-config"
|
|
31
|
-
},
|
|
32
|
-
"exports": {
|
|
33
|
-
".": {
|
|
34
|
-
"import": "./dist/index.es.js",
|
|
35
|
-
"require": "./dist/index.cjs",
|
|
36
|
-
"types": "./dist/index.d.ts"
|
|
37
|
-
}
|
|
17
|
+
"@swapkit/helpers": "1.0.0-rc.84",
|
|
18
|
+
"@swapkit/tokens": "1.0.0-rc.45",
|
|
19
|
+
"@swapkit/toolbox-cosmos": "1.0.0-rc.101",
|
|
20
|
+
"@swapkit/toolbox-evm": "1.0.0-rc.90",
|
|
21
|
+
"@swapkit/toolbox-substrate": "1.0.0-rc.19",
|
|
22
|
+
"@swapkit/toolbox-utxo": "1.0.0-rc.92",
|
|
23
|
+
"@swapkit/types": "1.0.0-rc.48"
|
|
38
24
|
},
|
|
39
25
|
"files": [
|
|
40
26
|
"src/",
|
|
@@ -42,22 +28,22 @@
|
|
|
42
28
|
],
|
|
43
29
|
"homepage": "https://github.com/thorswap/SwapKit",
|
|
44
30
|
"license": "Apache-2.0",
|
|
45
|
-
"main": "./dist/index.
|
|
46
|
-
"module": "./dist/index.es.js",
|
|
31
|
+
"main": "./dist/index.js",
|
|
47
32
|
"name": "@swapkit/core",
|
|
48
|
-
"publishConfig": {
|
|
49
|
-
"access": "public"
|
|
50
|
-
},
|
|
51
33
|
"react-native": "./src/index.ts",
|
|
52
|
-
"repository":
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/thorswap/SwapKit.git"
|
|
37
|
+
},
|
|
56
38
|
"scripts": {
|
|
57
|
-
"build": "
|
|
58
|
-
"clean": "rm -rf dist
|
|
59
|
-
"lint": "
|
|
60
|
-
"test": "
|
|
61
|
-
"test:coverage": "
|
|
62
|
-
|
|
63
|
-
}
|
|
39
|
+
"build": "bun run ./build.ts",
|
|
40
|
+
"clean": "rm -rf .turbo dist node_modules tsconfig.tsbuildinfo",
|
|
41
|
+
"lint": "biome check --apply ./src",
|
|
42
|
+
"test": "echo 'bun test'",
|
|
43
|
+
"test:coverage": "echo 'bun test --coverage'",
|
|
44
|
+
"type-check": "tsc --noEmit"
|
|
45
|
+
},
|
|
46
|
+
"type": "module",
|
|
47
|
+
"types": "./src/index.ts",
|
|
48
|
+
"version": "1.0.0-rc.120"
|
|
49
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { describe, expect, test } from "bun:test";
|
|
2
|
+
import { Chain, ChainToExplorerUrl, CosmosChains, EVMChains, UTXOChains } from "@swapkit/types";
|
|
3
|
+
import { getExplorerAddressUrl, getExplorerTxUrl } from "../helpers/explorerUrls.ts";
|
|
4
|
+
|
|
5
|
+
describe("Explorer URLs", () => {
|
|
6
|
+
describe("CosmosChains", () => {
|
|
7
|
+
for (const chain of CosmosChains) {
|
|
8
|
+
test(`getExplorerTxUrl returns correct URL for ${chain}`, () => {
|
|
9
|
+
expect(getExplorerTxUrl({ chain, txHash: "0x123456789" })).toBe(
|
|
10
|
+
`${ChainToExplorerUrl[chain]}/tx/123456789`,
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
expect(getExplorerAddressUrl({ chain, address: "asdfg" })).toBe(
|
|
14
|
+
`${ChainToExplorerUrl[chain]}/address/asdfg`,
|
|
15
|
+
);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
describe("EVMChains & SubstrateChains", () => {
|
|
21
|
+
for (const chain of [...EVMChains, Chain.Polkadot]) {
|
|
22
|
+
test(`getExplorerTxUrl returns correct URL for ${chain}`, () => {
|
|
23
|
+
expect(getExplorerTxUrl({ chain, txHash: "0x123456789" })).toBe(
|
|
24
|
+
`${ChainToExplorerUrl[chain]}/tx/0x123456789`,
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
expect(getExplorerAddressUrl({ chain, address: "asdfg" })).toBe(
|
|
28
|
+
`${ChainToExplorerUrl[chain]}/address/asdfg`,
|
|
29
|
+
);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
test("getExplorerTxUrl adds 0x for EVM like chains", () => {
|
|
34
|
+
expect(getExplorerTxUrl({ chain: Chain.Ethereum, txHash: "12345" })).toBe(
|
|
35
|
+
"https://etherscan.io/tx/0x12345",
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
describe("UTXOChains", () => {
|
|
41
|
+
for (const chain of UTXOChains.filter((c) => c !== Chain.Dash)) {
|
|
42
|
+
test(`getExplorerTxUrl returns correct URL for ${chain}`, () => {
|
|
43
|
+
expect(getExplorerTxUrl({ chain, txHash: "0x123456789" })).toBe(
|
|
44
|
+
`${ChainToExplorerUrl[chain]}/transaction/0x123456789`,
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
expect(getExplorerAddressUrl({ chain, address: "asdfg" })).toBe(
|
|
48
|
+
`${ChainToExplorerUrl[chain]}/address/asdfg`,
|
|
49
|
+
);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -1,92 +1,92 @@
|
|
|
1
1
|
export const avaxGeneric = [
|
|
2
2
|
{
|
|
3
|
-
inputs: [{ internalType:
|
|
4
|
-
stateMutability:
|
|
5
|
-
type:
|
|
3
|
+
inputs: [{ internalType: "address", name: "_ttp", type: "address" }],
|
|
4
|
+
stateMutability: "nonpayable",
|
|
5
|
+
type: "constructor",
|
|
6
6
|
},
|
|
7
7
|
{
|
|
8
8
|
anonymous: false,
|
|
9
9
|
inputs: [
|
|
10
|
-
{ indexed: false, internalType:
|
|
11
|
-
{ indexed: false, internalType:
|
|
10
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
11
|
+
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
12
12
|
],
|
|
13
|
-
name:
|
|
14
|
-
type:
|
|
13
|
+
name: "FeeSet",
|
|
14
|
+
type: "event",
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
anonymous: false,
|
|
18
18
|
inputs: [
|
|
19
|
-
{ indexed: true, internalType:
|
|
20
|
-
{ indexed: false, internalType:
|
|
19
|
+
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
20
|
+
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
21
21
|
],
|
|
22
|
-
name:
|
|
23
|
-
type:
|
|
22
|
+
name: "OwnerSet",
|
|
23
|
+
type: "event",
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
inputs: [],
|
|
27
|
-
name:
|
|
28
|
-
outputs: [{ internalType:
|
|
29
|
-
stateMutability:
|
|
30
|
-
type:
|
|
27
|
+
name: "fee",
|
|
28
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
29
|
+
stateMutability: "view",
|
|
30
|
+
type: "function",
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
inputs: [],
|
|
34
|
-
name:
|
|
35
|
-
outputs: [{ internalType:
|
|
36
|
-
stateMutability:
|
|
37
|
-
type:
|
|
34
|
+
name: "feeRecipient",
|
|
35
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
36
|
+
stateMutability: "view",
|
|
37
|
+
type: "function",
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
|
-
inputs: [{ internalType:
|
|
41
|
-
name:
|
|
42
|
-
outputs: [{ internalType:
|
|
43
|
-
stateMutability:
|
|
44
|
-
type:
|
|
40
|
+
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
41
|
+
name: "owners",
|
|
42
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
43
|
+
stateMutability: "view",
|
|
44
|
+
type: "function",
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
inputs: [
|
|
48
|
-
{ internalType:
|
|
49
|
-
{ internalType:
|
|
48
|
+
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
49
|
+
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
50
50
|
],
|
|
51
|
-
name:
|
|
51
|
+
name: "setFee",
|
|
52
52
|
outputs: [],
|
|
53
|
-
stateMutability:
|
|
54
|
-
type:
|
|
53
|
+
stateMutability: "nonpayable",
|
|
54
|
+
type: "function",
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
inputs: [
|
|
58
|
-
{ internalType:
|
|
59
|
-
{ internalType:
|
|
58
|
+
{ internalType: "address", name: "owner", type: "address" },
|
|
59
|
+
{ internalType: "bool", name: "active", type: "bool" },
|
|
60
60
|
],
|
|
61
|
-
name:
|
|
61
|
+
name: "setOwner",
|
|
62
62
|
outputs: [],
|
|
63
|
-
stateMutability:
|
|
64
|
-
type:
|
|
63
|
+
stateMutability: "nonpayable",
|
|
64
|
+
type: "function",
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
inputs: [
|
|
68
|
-
{ internalType:
|
|
69
|
-
{ internalType:
|
|
70
|
-
{ internalType:
|
|
71
|
-
{ internalType:
|
|
72
|
-
{ internalType:
|
|
73
|
-
{ internalType:
|
|
74
|
-
{ internalType:
|
|
75
|
-
{ internalType:
|
|
68
|
+
{ internalType: "address", name: "tcRouter", type: "address" },
|
|
69
|
+
{ internalType: "address", name: "tcVault", type: "address" },
|
|
70
|
+
{ internalType: "string", name: "tcMemo", type: "string" },
|
|
71
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
72
|
+
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
73
|
+
{ internalType: "address", name: "router", type: "address" },
|
|
74
|
+
{ internalType: "bytes", name: "data", type: "bytes" },
|
|
75
|
+
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
76
76
|
],
|
|
77
|
-
name:
|
|
77
|
+
name: "swapIn",
|
|
78
78
|
outputs: [],
|
|
79
|
-
stateMutability:
|
|
80
|
-
type:
|
|
79
|
+
stateMutability: "nonpayable",
|
|
80
|
+
type: "function",
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
inputs: [],
|
|
84
|
-
name:
|
|
84
|
+
name: "tokenTransferProxy",
|
|
85
85
|
outputs: [
|
|
86
|
-
{ internalType:
|
|
86
|
+
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
87
87
|
],
|
|
88
|
-
stateMutability:
|
|
89
|
-
type:
|
|
88
|
+
stateMutability: "view",
|
|
89
|
+
type: "function",
|
|
90
90
|
},
|
|
91
|
-
{ stateMutability:
|
|
91
|
+
{ stateMutability: "payable", type: "receive" },
|
|
92
92
|
];
|
|
@@ -1,145 +1,145 @@
|
|
|
1
1
|
export const avaxWoofi = [
|
|
2
2
|
{
|
|
3
3
|
inputs: [
|
|
4
|
-
{ internalType:
|
|
5
|
-
{ internalType:
|
|
6
|
-
{ internalType:
|
|
4
|
+
{ internalType: "address", name: "_ttp", type: "address" },
|
|
5
|
+
{ internalType: "address", name: "_weth", type: "address" },
|
|
6
|
+
{ internalType: "address", name: "_swapRouter", type: "address" },
|
|
7
7
|
],
|
|
8
|
-
stateMutability:
|
|
9
|
-
type:
|
|
8
|
+
stateMutability: "nonpayable",
|
|
9
|
+
type: "constructor",
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
12
|
anonymous: false,
|
|
13
13
|
inputs: [
|
|
14
|
-
{ indexed: false, internalType:
|
|
15
|
-
{ indexed: false, internalType:
|
|
14
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
15
|
+
{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
|
|
16
16
|
],
|
|
17
|
-
name:
|
|
18
|
-
type:
|
|
17
|
+
name: "FeeSet",
|
|
18
|
+
type: "event",
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
anonymous: false,
|
|
22
22
|
inputs: [
|
|
23
|
-
{ indexed: true, internalType:
|
|
24
|
-
{ indexed: false, internalType:
|
|
23
|
+
{ indexed: true, internalType: "address", name: "owner", type: "address" },
|
|
24
|
+
{ indexed: false, internalType: "bool", name: "active", type: "bool" },
|
|
25
25
|
],
|
|
26
|
-
name:
|
|
27
|
-
type:
|
|
26
|
+
name: "OwnerSet",
|
|
27
|
+
type: "event",
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
anonymous: false,
|
|
31
31
|
inputs: [
|
|
32
|
-
{ indexed: false, internalType:
|
|
33
|
-
{ indexed: false, internalType:
|
|
34
|
-
{ indexed: false, internalType:
|
|
35
|
-
{ indexed: false, internalType:
|
|
36
|
-
{ indexed: false, internalType:
|
|
37
|
-
{ indexed: false, internalType:
|
|
38
|
-
{ indexed: false, internalType:
|
|
32
|
+
{ indexed: false, internalType: "address", name: "from", type: "address" },
|
|
33
|
+
{ indexed: false, internalType: "address", name: "token", type: "address" },
|
|
34
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
|
|
35
|
+
{ indexed: false, internalType: "uint256", name: "out", type: "uint256" },
|
|
36
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
37
|
+
{ indexed: false, internalType: "address", name: "vault", type: "address" },
|
|
38
|
+
{ indexed: false, internalType: "string", name: "memo", type: "string" },
|
|
39
39
|
],
|
|
40
|
-
name:
|
|
41
|
-
type:
|
|
40
|
+
name: "SwapIn",
|
|
41
|
+
type: "event",
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
anonymous: false,
|
|
45
45
|
inputs: [
|
|
46
|
-
{ indexed: false, internalType:
|
|
47
|
-
{ indexed: false, internalType:
|
|
48
|
-
{ indexed: false, internalType:
|
|
49
|
-
{ indexed: false, internalType:
|
|
46
|
+
{ indexed: false, internalType: "address", name: "to", type: "address" },
|
|
47
|
+
{ indexed: false, internalType: "address", name: "token", type: "address" },
|
|
48
|
+
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
|
|
49
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
50
50
|
],
|
|
51
|
-
name:
|
|
52
|
-
type:
|
|
51
|
+
name: "SwapOut",
|
|
52
|
+
type: "event",
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
inputs: [],
|
|
56
|
-
name:
|
|
57
|
-
outputs: [{ internalType:
|
|
58
|
-
stateMutability:
|
|
59
|
-
type:
|
|
56
|
+
name: "fee",
|
|
57
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
58
|
+
stateMutability: "view",
|
|
59
|
+
type: "function",
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
inputs: [],
|
|
63
|
-
name:
|
|
64
|
-
outputs: [{ internalType:
|
|
65
|
-
stateMutability:
|
|
66
|
-
type:
|
|
63
|
+
name: "feeRecipient",
|
|
64
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
65
|
+
stateMutability: "view",
|
|
66
|
+
type: "function",
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
|
-
inputs: [{ internalType:
|
|
70
|
-
name:
|
|
71
|
-
outputs: [{ internalType:
|
|
72
|
-
stateMutability:
|
|
73
|
-
type:
|
|
69
|
+
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
70
|
+
name: "owners",
|
|
71
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
72
|
+
stateMutability: "view",
|
|
73
|
+
type: "function",
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
inputs: [
|
|
77
|
-
{ internalType:
|
|
78
|
-
{ internalType:
|
|
77
|
+
{ internalType: "uint256", name: "_fee", type: "uint256" },
|
|
78
|
+
{ internalType: "address", name: "_feeRecipient", type: "address" },
|
|
79
79
|
],
|
|
80
|
-
name:
|
|
80
|
+
name: "setFee",
|
|
81
81
|
outputs: [],
|
|
82
|
-
stateMutability:
|
|
83
|
-
type:
|
|
82
|
+
stateMutability: "nonpayable",
|
|
83
|
+
type: "function",
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
inputs: [
|
|
87
|
-
{ internalType:
|
|
88
|
-
{ internalType:
|
|
87
|
+
{ internalType: "address", name: "owner", type: "address" },
|
|
88
|
+
{ internalType: "bool", name: "active", type: "bool" },
|
|
89
89
|
],
|
|
90
|
-
name:
|
|
90
|
+
name: "setOwner",
|
|
91
91
|
outputs: [],
|
|
92
|
-
stateMutability:
|
|
93
|
-
type:
|
|
92
|
+
stateMutability: "nonpayable",
|
|
93
|
+
type: "function",
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
inputs: [
|
|
97
|
-
{ internalType:
|
|
98
|
-
{ internalType:
|
|
99
|
-
{ internalType:
|
|
100
|
-
{ internalType:
|
|
101
|
-
{ internalType:
|
|
102
|
-
{ internalType:
|
|
103
|
-
{ internalType:
|
|
97
|
+
{ internalType: "address", name: "router", type: "address" },
|
|
98
|
+
{ internalType: "address", name: "vault", type: "address" },
|
|
99
|
+
{ internalType: "string", name: "memo", type: "string" },
|
|
100
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
101
|
+
{ internalType: "uint256", name: "amount", type: "uint256" },
|
|
102
|
+
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
103
|
+
{ internalType: "uint256", name: "deadline", type: "uint256" },
|
|
104
104
|
],
|
|
105
|
-
name:
|
|
105
|
+
name: "swapIn",
|
|
106
106
|
outputs: [],
|
|
107
|
-
stateMutability:
|
|
108
|
-
type:
|
|
107
|
+
stateMutability: "nonpayable",
|
|
108
|
+
type: "function",
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
inputs: [
|
|
112
|
-
{ internalType:
|
|
113
|
-
{ internalType:
|
|
114
|
-
{ internalType:
|
|
112
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
113
|
+
{ internalType: "address", name: "to", type: "address" },
|
|
114
|
+
{ internalType: "uint256", name: "amountOutMin", type: "uint256" },
|
|
115
115
|
],
|
|
116
|
-
name:
|
|
116
|
+
name: "swapOut",
|
|
117
117
|
outputs: [],
|
|
118
|
-
stateMutability:
|
|
119
|
-
type:
|
|
118
|
+
stateMutability: "payable",
|
|
119
|
+
type: "function",
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
inputs: [],
|
|
123
|
-
name:
|
|
124
|
-
outputs: [{ internalType:
|
|
125
|
-
stateMutability:
|
|
126
|
-
type:
|
|
123
|
+
name: "swapRouter",
|
|
124
|
+
outputs: [{ internalType: "contract IWoofi", name: "", type: "address" }],
|
|
125
|
+
stateMutability: "view",
|
|
126
|
+
type: "function",
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
inputs: [],
|
|
130
|
-
name:
|
|
130
|
+
name: "tokenTransferProxy",
|
|
131
131
|
outputs: [
|
|
132
|
-
{ internalType:
|
|
132
|
+
{ internalType: "contract TSAggregatorTokenTransferProxy", name: "", type: "address" },
|
|
133
133
|
],
|
|
134
|
-
stateMutability:
|
|
135
|
-
type:
|
|
134
|
+
stateMutability: "view",
|
|
135
|
+
type: "function",
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
inputs: [],
|
|
139
|
-
name:
|
|
140
|
-
outputs: [{ internalType:
|
|
141
|
-
stateMutability:
|
|
142
|
-
type:
|
|
139
|
+
name: "weth",
|
|
140
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
141
|
+
stateMutability: "view",
|
|
142
|
+
type: "function",
|
|
143
143
|
},
|
|
144
|
-
{ stateMutability:
|
|
144
|
+
{ stateMutability: "payable", type: "receive" },
|
|
145
145
|
];
|