@paraswap/dex-lib 3.7.2 → 3.7.3-idle
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/Redstone.json +739 -0
- package/build/abi/aavev3stata/Factory.json +128 -0
- package/build/abi/aavev3stata/Token.json +735 -0
- package/build/abi/angle-transmuter/MorphoOracle.json +193 -0
- package/build/abi/angle-transmuter/MorphoVault.json +2506 -0
- package/build/abi/angle-transmuter/Pyth.json +1534 -0
- package/build/abi/angle-transmuter/Transmuter.json +1711 -0
- package/build/abi/angle-transmuter/TransmuterSidechain.json +1798 -0
- package/build/abi/idle-dao/idle-cdo-factory.json +38 -0
- package/build/abi/idle-dao/idle-cdo.json +1245 -0
- package/build/config.js +2 -0
- package/build/config.js.map +1 -1
- package/build/dex/aave-v1/aave-v1.d.ts +2 -1
- package/build/dex/aave-v1/aave-v1.js +22 -0
- package/build/dex/aave-v1/aave-v1.js.map +1 -1
- package/build/dex/aave-v3-stata/aave-v3-stata.d.ts +50 -0
- package/build/dex/aave-v3-stata/aave-v3-stata.js +385 -0
- package/build/dex/aave-v3-stata/aave-v3-stata.js.map +1 -0
- package/build/dex/aave-v3-stata/config.d.ts +4 -0
- package/build/dex/aave-v3-stata/config.js +50 -0
- package/build/dex/aave-v3-stata/config.js.map +1 -0
- package/build/dex/aave-v3-stata/tokens.d.ts +10 -0
- package/build/dex/aave-v3-stata/tokens.js +43 -0
- package/build/dex/aave-v3-stata/tokens.js.map +1 -0
- package/build/dex/aave-v3-stata/types.d.ts +46 -0
- package/build/dex/aave-v3-stata/types.js +23 -0
- package/build/dex/aave-v3-stata/types.js.map +1 -0
- package/build/dex/aave-v3-stata/utils.d.ts +4 -0
- package/build/dex/aave-v3-stata/utils.js +67 -0
- package/build/dex/aave-v3-stata/utils.js.map +1 -0
- package/build/dex/angle-transmuter/angle-transmuter-pool.d.ts +67 -0
- package/build/dex/angle-transmuter/angle-transmuter-pool.js +448 -0
- package/build/dex/angle-transmuter/angle-transmuter-pool.js.map +1 -0
- package/build/dex/angle-transmuter/angle-transmuter.d.ts +59 -0
- package/build/dex/angle-transmuter/angle-transmuter.js +264 -0
- package/build/dex/angle-transmuter/angle-transmuter.js.map +1 -0
- package/build/dex/angle-transmuter/backedOracle.d.ts +19 -0
- package/build/dex/angle-transmuter/backedOracle.js +56 -0
- package/build/dex/angle-transmuter/backedOracle.js.map +1 -0
- package/build/dex/angle-transmuter/config.d.ts +4 -0
- package/build/dex/angle-transmuter/config.js +50 -0
- package/build/dex/angle-transmuter/config.js.map +1 -0
- package/build/dex/angle-transmuter/constants.d.ts +9 -0
- package/build/dex/angle-transmuter/constants.js +136 -0
- package/build/dex/angle-transmuter/constants.js.map +1 -0
- package/build/dex/angle-transmuter/morphoOracle.d.ts +42 -0
- package/build/dex/angle-transmuter/morphoOracle.js +179 -0
- package/build/dex/angle-transmuter/morphoOracle.js.map +1 -0
- package/build/dex/angle-transmuter/morphoVault.d.ts +20 -0
- package/build/dex/angle-transmuter/morphoVault.js +84 -0
- package/build/dex/angle-transmuter/morphoVault.js.map +1 -0
- package/build/dex/angle-transmuter/pyth.d.ts +19 -0
- package/build/dex/angle-transmuter/pyth.js +70 -0
- package/build/dex/angle-transmuter/pyth.js.map +1 -0
- package/build/dex/angle-transmuter/redstone.d.ts +20 -0
- package/build/dex/angle-transmuter/redstone.js +64 -0
- package/build/dex/angle-transmuter/redstone.js.map +1 -0
- package/build/dex/angle-transmuter/transmuter.d.ts +55 -0
- package/build/dex/angle-transmuter/transmuter.js +398 -0
- package/build/dex/angle-transmuter/transmuter.js.map +1 -0
- package/build/dex/angle-transmuter/types.d.ts +189 -0
- package/build/dex/angle-transmuter/types.js +33 -0
- package/build/dex/angle-transmuter/types.js.map +1 -0
- package/build/dex/angle-transmuter/utils.d.ts +9 -0
- package/build/dex/angle-transmuter/utils.js +257 -0
- package/build/dex/angle-transmuter/utils.js.map +1 -0
- package/build/dex/idle-dao/config.d.ts +6 -0
- package/build/dex/idle-dao/config.js +307 -0
- package/build/dex/idle-dao/config.js.map +1 -0
- package/build/dex/idle-dao/idle-dao-pool.d.ts +56 -0
- package/build/dex/idle-dao/idle-dao-pool.js +176 -0
- package/build/dex/idle-dao/idle-dao-pool.js.map +1 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.d.ts +16 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js +57 -0
- package/build/dex/idle-dao/idle-dao-pooling-pool.js.map +1 -0
- package/build/dex/idle-dao/idle-dao.d.ts +41 -0
- package/build/dex/idle-dao/idle-dao.js +238 -0
- package/build/dex/idle-dao/idle-dao.js.map +1 -0
- package/build/dex/idle-dao/scripts.d.ts +9 -0
- package/build/dex/idle-dao/scripts.js +552 -0
- package/build/dex/idle-dao/scripts.js.map +1 -0
- package/build/dex/idle-dao/tokens.d.ts +9 -0
- package/build/dex/idle-dao/tokens.js +65 -0
- package/build/dex/idle-dao/tokens.js.map +1 -0
- package/build/dex/idle-dao/types.d.ts +35 -0
- package/build/dex/idle-dao/types.js +11 -0
- package/build/dex/idle-dao/types.js.map +1 -0
- package/build/dex/idle-dao/utils.d.ts +8 -0
- package/build/dex/idle-dao/utils.js +148 -0
- package/build/dex/idle-dao/utils.js.map +1 -0
- package/build/dex/index.js +4 -0
- package/build/dex/index.js.map +1 -1
- package/build/dex/platypus/platypus.d.ts +2 -1
- package/build/dex/platypus/platypus.js +31 -0
- package/build/dex/platypus/platypus.js.map +1 -1
- package/build/dex/swaap-v1/swaap-v1.d.ts +2 -1
- package/build/dex/swaap-v1/swaap-v1.js +10 -0
- package/build/dex/swaap-v1/swaap-v1.js.map +1 -1
- package/build/lib/chainlink.d.ts +2 -0
- package/build/lib/chainlink.js +9 -0
- package/build/lib/chainlink.js.map +1 -1
- package/build/types.d.ts +1 -0
- package/build/utils.d.ts +1 -1
- package/package.json +1 -1
- package/src/abi/Redstone.json +739 -0
- package/src/abi/angle-transmuter/ChainlinkAccessControlledOffchainAggregator.json +1246 -0
- package/src/abi/angle-transmuter/ChainlinkEACAggregatorProxy.json +509 -0
- package/src/abi/angle-transmuter/MorphoOracle.json +193 -0
- package/src/abi/angle-transmuter/MorphoVault.json +2506 -0
- package/src/abi/angle-transmuter/Pyth.json +1534 -0
- package/src/abi/angle-transmuter/Transmuter.json +1711 -0
- package/src/abi/angle-transmuter/TransmuterSidechain.json +1798 -0
- package/src/abi/idle-dao/idle-cdo-factory.json +38 -0
- package/src/abi/idle-dao/idle-cdo.json +1245 -0
- package/src/config.ts +3 -0
- package/src/dex/angle-transmuter/angle-transmuter-e2e.test.ts +156 -0
- package/src/dex/angle-transmuter/angle-transmuter-events.test.ts +365 -0
- package/src/dex/angle-transmuter/angle-transmuter-integration.test.ts +390 -0
- package/src/dex/angle-transmuter/angle-transmuter-pool.ts +895 -0
- package/src/dex/angle-transmuter/angle-transmuter.ts +408 -0
- package/src/dex/angle-transmuter/backedOracle.ts +91 -0
- package/src/dex/angle-transmuter/config.ts +50 -0
- package/src/dex/angle-transmuter/constants.ts +138 -0
- package/src/dex/angle-transmuter/morphoOracle.ts +335 -0
- package/src/dex/angle-transmuter/morphoVault.ts +134 -0
- package/src/dex/angle-transmuter/pyth.ts +105 -0
- package/src/dex/angle-transmuter/redstone.ts +105 -0
- package/src/dex/angle-transmuter/transmuter.ts +619 -0
- package/src/dex/angle-transmuter/types.ts +203 -0
- package/src/dex/angle-transmuter/utils.ts +358 -0
- package/src/dex/idle-dao/config.ts +309 -0
- package/src/dex/idle-dao/idle-dao-e2e.test.ts +112 -0
- package/src/dex/idle-dao/idle-dao-integration.test.ts +155 -0
- package/src/dex/idle-dao/idle-dao.ts +363 -0
- package/src/dex/idle-dao/scripts.ts +553 -0
- package/src/dex/idle-dao/tokens.ts +90 -0
- package/src/dex/idle-dao/types.ts +43 -0
- package/src/dex/idle-dao/utils.ts +215 -0
- package/src/dex/index.ts +4 -0
- package/src/lib/chainlink.ts +15 -0
- package/src/types.ts +1 -0
- package/tests/constants-e2e.ts +117 -6
- package/build/abi/Uncompressor.json +0 -250
- package/build/dex/bProtocol.d.ts +0 -18
- package/build/dex/bProtocol.js +0 -39
- package/build/dex/bProtocol.js.map +0 -1
- package/build/dex/bancor.d.ts +0 -26
- package/build/dex/bancor.js +0 -58
- package/build/dex/bancor.js.map +0 -1
- package/build/dex/compound.d.ts +0 -18
- package/build/dex/compound.js +0 -46
- package/build/dex/compound.js.map +0 -1
- package/build/dex/curve-v2.d.ts +0 -58
- package/build/dex/curve-v2.js +0 -180
- package/build/dex/curve-v2.js.map +0 -1
- package/build/dex/dodo-v1.d.ts +0 -33
- package/build/dex/dodo-v1.js +0 -63
- package/build/dex/dodo-v1.js.map +0 -1
- package/build/dex/etherfi/etherfi.d.ts +0 -26
- package/build/dex/etherfi/etherfi.js +0 -96
- package/build/dex/etherfi/etherfi.js.map +0 -1
- package/build/dex/lido.d.ts +0 -19
- package/build/dex/lido.js +0 -42
- package/build/dex/lido.js.map +0 -1
- package/build/dex/onebit.d.ts +0 -25
- package/build/dex/onebit.js +0 -42
- package/build/dex/onebit.js.map +0 -1
- package/build/dex/sdai/config.d.ts +0 -11
- package/build/dex/sdai/config.js +0 -21
- package/build/dex/sdai/config.js.map +0 -1
- package/build/dex/sdai/constants.d.ts +0 -2
- package/build/dex/sdai/constants.js +0 -6
- package/build/dex/sdai/constants.js.map +0 -1
- package/build/dex/sdai/scripts/validate-state.d.ts +0 -1
- package/build/dex/sdai/scripts/validate-state.js +0 -102
- package/build/dex/sdai/scripts/validate-state.js.map +0 -1
- package/build/dex/sdai/sdai-pool.d.ts +0 -16
- package/build/dex/sdai/sdai-pool.js +0 -85
- package/build/dex/sdai/sdai-pool.js.map +0 -1
- package/build/dex/sdai/sdai.d.ts +0 -51
- package/build/dex/sdai/sdai.js +0 -172
- package/build/dex/sdai/sdai.js.map +0 -1
- package/build/dex/sdai/types.d.ts +0 -21
- package/build/dex/sdai/types.js +0 -11
- package/build/dex/sdai/types.js.map +0 -1
- package/build/dex/sdai/utils.d.ts +0 -4
- package/build/dex/sdai/utils.js +0 -39
- package/build/dex/sdai/utils.js.map +0 -1
- package/build/dex/smoothy.d.ts +0 -26
- package/build/dex/smoothy.js +0 -48
- package/build/dex/smoothy.js.map +0 -1
- package/build/dex/stable-pool.d.ts +0 -28
- package/build/dex/stable-pool.js +0 -62
- package/build/dex/stable-pool.js.map +0 -1
- package/build/dex/trader-joe-v2.1.d.ts +0 -43
- package/build/dex/trader-joe-v2.1.js +0 -79
- package/build/dex/trader-joe-v2.1.js.map +0 -1
- package/build/executor/compressor/Compressor.d.ts +0 -23
- package/build/executor/compressor/Compressor.js +0 -144
- package/build/executor/compressor/Compressor.js.map +0 -1
- package/build/executor/compressor/compress.d.ts +0 -17
- package/build/executor/compressor/compress.js +0 -187
- package/build/executor/compressor/compress.js.map +0 -1
- package/build/executor/compressor/compress_functions/addressSubstitution.d.ts +0 -6
- package/build/executor/compressor/compress_functions/addressSubstitution.js +0 -29
- package/build/executor/compressor/compress_functions/addressSubstitution.js.map +0 -1
- package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.d.ts +0 -10
- package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js +0 -40
- package/build/executor/compressor/compress_functions/addressSubstitutionFromObject.js.map +0 -1
- package/build/executor/compressor/compress_functions/byteSubstitution.d.ts +0 -11
- package/build/executor/compressor/compress_functions/byteSubstitution.js +0 -64
- package/build/executor/compressor/compress_functions/byteSubstitution.js.map +0 -1
- package/build/executor/compressor/compress_functions/ffSubstitution.d.ts +0 -7
- package/build/executor/compressor/compress_functions/ffSubstitution.js +0 -54
- package/build/executor/compressor/compress_functions/ffSubstitution.js.map +0 -1
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute.d.ts +0 -8
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js +0 -67
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute.js.map +0 -1
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.d.ts +0 -8
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js +0 -61
- package/build/executor/compressor/compress_functions/findLongestAndSubstitute_old.js.map +0 -1
- package/build/executor/compressor/compress_functions/reverseAddressSubstitution.d.ts +0 -6
- package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js +0 -37
- package/build/executor/compressor/compress_functions/reverseAddressSubstitution.js.map +0 -1
- package/build/executor/compressor/compress_functions/searchUnusedBytes.d.ts +0 -9
- package/build/executor/compressor/compress_functions/searchUnusedBytes.js +0 -33
- package/build/executor/compressor/compress_functions/searchUnusedBytes.js.map +0 -1
- package/build/executor/compressor/fetchSaved.d.ts +0 -0
- package/build/executor/compressor/fetchSaved.js +0 -17
- package/build/executor/compressor/fetchSaved.js.map +0 -1
- package/build/executor/compressor/utils/computeCostL2.d.ts +0 -2
- package/build/executor/compressor/utils/computeCostL2.js +0 -14
- package/build/executor/compressor/utils/computeCostL2.js.map +0 -1
- package/build/executor/compressor/utils/findLongestDuplicatedString.d.ts +0 -2
- package/build/executor/compressor/utils/findLongestDuplicatedString.js +0 -30
- package/build/executor/compressor/utils/findLongestDuplicatedString.js.map +0 -1
- package/build/executor/compressor/utils/getAllIndexes.d.ts +0 -2
- package/build/executor/compressor/utils/getAllIndexes.js +0 -12
- package/build/executor/compressor/utils/getAllIndexes.js.map +0 -1
- package/build/executor/compressor/utils/getByteForAddress.d.ts +0 -2
- package/build/executor/compressor/utils/getByteForAddress.js +0 -14
- package/build/executor/compressor/utils/getByteForAddress.js.map +0 -1
- package/build/executor/compressor/utils/intTo2Bytes.d.ts +0 -2
- package/build/executor/compressor/utils/intTo2Bytes.js +0 -14
- package/build/executor/compressor/utils/intTo2Bytes.js.map +0 -1
- package/build/executor/compressor/utils/intTo3Bytes.d.ts +0 -2
- package/build/executor/compressor/utils/intTo3Bytes.js +0 -18
- package/build/executor/compressor/utils/intTo3Bytes.js.map +0 -1
- package/build/executor/compressor/utils/intToByte.d.ts +0 -2
- package/build/executor/compressor/utils/intToByte.js +0 -10
- package/build/executor/compressor/utils/intToByte.js.map +0 -1
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [
|
|
4
|
-
{
|
|
5
|
-
"internalType": "address[]",
|
|
6
|
-
"name": "_savedAddresses",
|
|
7
|
-
"type": "address[]"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"internalType": "bytes4[]",
|
|
11
|
-
"name": "_methodPrefixes",
|
|
12
|
-
"type": "bytes4[]"
|
|
13
|
-
},
|
|
14
|
-
{ "internalType": "address", "name": "_augustus", "type": "address" },
|
|
15
|
-
{ "internalType": "address", "name": "_owner", "type": "address" }
|
|
16
|
-
],
|
|
17
|
-
"stateMutability": "nonpayable",
|
|
18
|
-
"type": "constructor"
|
|
19
|
-
},
|
|
20
|
-
{ "inputs": [], "name": "NotOwnerOrAugustus", "type": "error" },
|
|
21
|
-
{
|
|
22
|
-
"inputs": [
|
|
23
|
-
{ "internalType": "address", "name": "owner", "type": "address" }
|
|
24
|
-
],
|
|
25
|
-
"name": "OwnableInvalidOwner",
|
|
26
|
-
"type": "error"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"inputs": [
|
|
30
|
-
{ "internalType": "address", "name": "account", "type": "address" }
|
|
31
|
-
],
|
|
32
|
-
"name": "OwnableUnauthorizedAccount",
|
|
33
|
-
"type": "error"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"anonymous": false,
|
|
37
|
-
"inputs": [
|
|
38
|
-
{
|
|
39
|
-
"indexed": true,
|
|
40
|
-
"internalType": "address",
|
|
41
|
-
"name": "addressToSave",
|
|
42
|
-
"type": "address"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"indexed": true,
|
|
46
|
-
"internalType": "bytes3",
|
|
47
|
-
"name": "byteToSave",
|
|
48
|
-
"type": "bytes3"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"name": "AddressSaved",
|
|
52
|
-
"type": "event"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"anonymous": false,
|
|
56
|
-
"inputs": [
|
|
57
|
-
{
|
|
58
|
-
"indexed": true,
|
|
59
|
-
"internalType": "bytes4",
|
|
60
|
-
"name": "methodPrefixToSave",
|
|
61
|
-
"type": "bytes4"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"indexed": true,
|
|
65
|
-
"internalType": "uint256",
|
|
66
|
-
"name": "indexSaved",
|
|
67
|
-
"type": "uint256"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"name": "MethodPrefixSaved",
|
|
71
|
-
"type": "event"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"anonymous": false,
|
|
75
|
-
"inputs": [
|
|
76
|
-
{
|
|
77
|
-
"indexed": true,
|
|
78
|
-
"internalType": "address",
|
|
79
|
-
"name": "previousOwner",
|
|
80
|
-
"type": "address"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"indexed": true,
|
|
84
|
-
"internalType": "address",
|
|
85
|
-
"name": "newOwner",
|
|
86
|
-
"type": "address"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"name": "OwnershipTransferred",
|
|
90
|
-
"type": "event"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"inputs": [],
|
|
94
|
-
"name": "MAX_UINT24",
|
|
95
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
96
|
-
"stateMutability": "view",
|
|
97
|
-
"type": "function"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"inputs": [],
|
|
101
|
-
"name": "MAX_UINT8",
|
|
102
|
-
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
103
|
-
"stateMutability": "view",
|
|
104
|
-
"type": "function"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
108
|
-
"name": "addressToByte",
|
|
109
|
-
"outputs": [{ "internalType": "bytes3", "name": "", "type": "bytes3" }],
|
|
110
|
-
"stateMutability": "view",
|
|
111
|
-
"type": "function"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"inputs": [],
|
|
115
|
-
"name": "augustus",
|
|
116
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
117
|
-
"stateMutability": "view",
|
|
118
|
-
"type": "function"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"inputs": [
|
|
122
|
-
{ "internalType": "bytes3", "name": "inputByte", "type": "bytes3" }
|
|
123
|
-
],
|
|
124
|
-
"name": "getAddressForByte",
|
|
125
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
126
|
-
"stateMutability": "view",
|
|
127
|
-
"type": "function"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"inputs": [],
|
|
131
|
-
"name": "getAllSavedAddresses",
|
|
132
|
-
"outputs": [
|
|
133
|
-
{ "internalType": "address[]", "name": "", "type": "address[]" }
|
|
134
|
-
],
|
|
135
|
-
"stateMutability": "view",
|
|
136
|
-
"type": "function"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"inputs": [],
|
|
140
|
-
"name": "getAllSavedByteForMethodPrefixes",
|
|
141
|
-
"outputs": [{ "internalType": "bytes4[]", "name": "", "type": "bytes4[]" }],
|
|
142
|
-
"stateMutability": "view",
|
|
143
|
-
"type": "function"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"inputs": [
|
|
147
|
-
{ "internalType": "address", "name": "addressToGet", "type": "address" }
|
|
148
|
-
],
|
|
149
|
-
"name": "getByteForAddress",
|
|
150
|
-
"outputs": [{ "internalType": "bytes3", "name": "", "type": "bytes3" }],
|
|
151
|
-
"stateMutability": "view",
|
|
152
|
-
"type": "function"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"inputs": [],
|
|
156
|
-
"name": "owner",
|
|
157
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
158
|
-
"stateMutability": "view",
|
|
159
|
-
"type": "function"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"inputs": [],
|
|
163
|
-
"name": "renounceOwnership",
|
|
164
|
-
"outputs": [],
|
|
165
|
-
"stateMutability": "nonpayable",
|
|
166
|
-
"type": "function"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
170
|
-
"name": "savedAddresses",
|
|
171
|
-
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
172
|
-
"stateMutability": "view",
|
|
173
|
-
"type": "function"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
177
|
-
"name": "savedMethodPrefixes",
|
|
178
|
-
"outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }],
|
|
179
|
-
"stateMutability": "view",
|
|
180
|
-
"type": "function"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"inputs": [
|
|
184
|
-
{ "internalType": "address", "name": "addressToSave", "type": "address" }
|
|
185
|
-
],
|
|
186
|
-
"name": "setByteForAddress",
|
|
187
|
-
"outputs": [],
|
|
188
|
-
"stateMutability": "nonpayable",
|
|
189
|
-
"type": "function"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"inputs": [
|
|
193
|
-
{
|
|
194
|
-
"internalType": "address[]",
|
|
195
|
-
"name": "addressesToSave",
|
|
196
|
-
"type": "address[]"
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
"name": "setByteForAddresses",
|
|
200
|
-
"outputs": [],
|
|
201
|
-
"stateMutability": "nonpayable",
|
|
202
|
-
"type": "function"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
"inputs": [
|
|
206
|
-
{
|
|
207
|
-
"internalType": "bytes4",
|
|
208
|
-
"name": "methodPrefixToSave",
|
|
209
|
-
"type": "bytes4"
|
|
210
|
-
}
|
|
211
|
-
],
|
|
212
|
-
"name": "setByteForMethodPrefix",
|
|
213
|
-
"outputs": [],
|
|
214
|
-
"stateMutability": "nonpayable",
|
|
215
|
-
"type": "function"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"inputs": [
|
|
219
|
-
{
|
|
220
|
-
"internalType": "bytes4[]",
|
|
221
|
-
"name": "methodPrefixesToSave",
|
|
222
|
-
"type": "bytes4[]"
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
"name": "setByteMethodPrefixes",
|
|
226
|
-
"outputs": [],
|
|
227
|
-
"stateMutability": "nonpayable",
|
|
228
|
-
"type": "function"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"inputs": [
|
|
232
|
-
{ "internalType": "address", "name": "newOwner", "type": "address" }
|
|
233
|
-
],
|
|
234
|
-
"name": "transferOwnership",
|
|
235
|
-
"outputs": [],
|
|
236
|
-
"stateMutability": "nonpayable",
|
|
237
|
-
"type": "function"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"inputs": [
|
|
241
|
-
{ "internalType": "bytes", "name": "compressedData", "type": "bytes" }
|
|
242
|
-
],
|
|
243
|
-
"name": "uncompress",
|
|
244
|
-
"outputs": [
|
|
245
|
-
{ "internalType": "bytes", "name": "uncompressedData", "type": "bytes" }
|
|
246
|
-
],
|
|
247
|
-
"stateMutability": "nonpayable",
|
|
248
|
-
"type": "function"
|
|
249
|
-
}
|
|
250
|
-
]
|
package/build/dex/bProtocol.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Interface } from '@ethersproject/abi';
|
|
2
|
-
import { SwapSide } from '../constants';
|
|
3
|
-
import { AdapterExchangeParam, SimpleExchangeParam } from '../types';
|
|
4
|
-
import { IDexTxBuilder } from './idex';
|
|
5
|
-
import { SimpleExchange } from './simple-exchange';
|
|
6
|
-
import { IDexHelper } from '../dex-helper';
|
|
7
|
-
export declare type BProtocolData = {
|
|
8
|
-
exchange: string;
|
|
9
|
-
};
|
|
10
|
-
declare type BProtocolParam = [lusdAmount: string, minEthReturn: string, dest: string];
|
|
11
|
-
export declare class BProtocol extends SimpleExchange implements IDexTxBuilder<BProtocolData, BProtocolParam> {
|
|
12
|
-
static dexKeys: string[];
|
|
13
|
-
exchangeRouterInterface: Interface;
|
|
14
|
-
constructor(dexHelper: IDexHelper);
|
|
15
|
-
getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BProtocolData, side: SwapSide): AdapterExchangeParam;
|
|
16
|
-
getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BProtocolData, side: SwapSide): Promise<SimpleExchangeParam>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
package/build/dex/bProtocol.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.BProtocol = void 0;
|
|
7
|
-
const abi_1 = require("@ethersproject/abi");
|
|
8
|
-
const simple_exchange_1 = require("./simple-exchange");
|
|
9
|
-
const BProtocol_json_1 = __importDefault(require("../abi/BProtocol.json"));
|
|
10
|
-
var BProtocolFunctions;
|
|
11
|
-
(function (BProtocolFunctions) {
|
|
12
|
-
BProtocolFunctions["swap"] = "swap";
|
|
13
|
-
})(BProtocolFunctions || (BProtocolFunctions = {}));
|
|
14
|
-
class BProtocol extends simple_exchange_1.SimpleExchange {
|
|
15
|
-
constructor(dexHelper) {
|
|
16
|
-
super(dexHelper, 'bprotocol');
|
|
17
|
-
this.exchangeRouterInterface = new abi_1.Interface(BProtocol_json_1.default);
|
|
18
|
-
}
|
|
19
|
-
getAdapterParam(srcToken, destToken, srcAmount, destAmount, data, side) {
|
|
20
|
-
return {
|
|
21
|
-
targetExchange: data.exchange,
|
|
22
|
-
payload: '0x',
|
|
23
|
-
networkFee: '0',
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
async getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
|
|
27
|
-
const swapFunction = BProtocolFunctions.swap;
|
|
28
|
-
const swapFunctionParams = [
|
|
29
|
-
srcAmount,
|
|
30
|
-
destAmount,
|
|
31
|
-
this.augustusAddress,
|
|
32
|
-
];
|
|
33
|
-
const swapData = this.exchangeRouterInterface.encodeFunctionData(swapFunction, swapFunctionParams);
|
|
34
|
-
return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, data.exchange);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.BProtocol = BProtocol;
|
|
38
|
-
BProtocol.dexKeys = ['bprotocol'];
|
|
39
|
-
//# sourceMappingURL=bProtocol.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bProtocol.js","sourceRoot":"","sources":["../../src/dex/bProtocol.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA6D;AAI7D,uDAAmD;AACnD,2EAAiD;AAOjD,IAAK,kBAEJ;AAFD,WAAK,kBAAkB;IACrB,mCAAa,CAAA;AACf,CAAC,EAFI,kBAAkB,KAAlB,kBAAkB,QAEtB;AAED,MAAa,SACX,SAAQ,gCAAc;IAMtB,YAAY,SAAqB;QAC/B,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAC9B,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAS,CAC1C,wBAA8B,CAC/B,CAAC;IACJ,CAAC;IAED,eAAe,CACb,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAmB,EACnB,IAAc;QAEd,OAAO;YACL,cAAc,EAAE,IAAI,CAAC,QAAQ;YAC7B,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,GAAG;SAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAmB,EACnB,IAAc;QAEd,MAAM,YAAY,GAAG,kBAAkB,CAAC,IAAI,CAAC;QAC7C,MAAM,kBAAkB,GAAmB;YACzC,SAAS;YACT,UAAU;YACV,IAAI,CAAC,eAAe;SACrB,CAAC;QACF,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAC9D,YAAY,EACZ,kBAAkB,CACnB,CAAC;QAEF,OAAO,IAAI,CAAC,qCAAqC,CAC/C,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,CAAC,QAAQ,CACd,CAAC;IACJ,CAAC;;AAxDH,8BAyDC;AArDQ,iBAAO,GAAG,CAAC,WAAW,CAAC,CAAC"}
|
package/build/dex/bancor.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Interface } from '@ethersproject/abi';
|
|
2
|
-
import { SwapSide } from '../constants';
|
|
3
|
-
import { AdapterExchangeParam, Address, SimpleExchangeParam } from '../types';
|
|
4
|
-
import { IDexTxBuilder } from './idex';
|
|
5
|
-
import { SimpleExchange } from './simple-exchange';
|
|
6
|
-
import { IDexHelper } from '../dex-helper';
|
|
7
|
-
export declare type BancorData = {
|
|
8
|
-
minDestToken: string;
|
|
9
|
-
path: Address[];
|
|
10
|
-
bancorNetwork?: string;
|
|
11
|
-
};
|
|
12
|
-
declare type BancorParam = [
|
|
13
|
-
path: Address[],
|
|
14
|
-
srcAmount: string,
|
|
15
|
-
minDestToken: string,
|
|
16
|
-
affiliateAccount: string,
|
|
17
|
-
affiliateFee: string
|
|
18
|
-
];
|
|
19
|
-
export declare class Bancor extends SimpleExchange implements IDexTxBuilder<BancorData, BancorParam> {
|
|
20
|
-
static dexKeys: string[];
|
|
21
|
-
exchangeRouterInterface: Interface;
|
|
22
|
-
constructor(dexHelper: IDexHelper);
|
|
23
|
-
getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BancorData, side: SwapSide): AdapterExchangeParam;
|
|
24
|
-
getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: BancorData, side: SwapSide): Promise<SimpleExchangeParam>;
|
|
25
|
-
}
|
|
26
|
-
export {};
|
package/build/dex/bancor.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Bancor = void 0;
|
|
7
|
-
const abi_1 = require("@ethersproject/abi");
|
|
8
|
-
const constants_1 = require("../constants");
|
|
9
|
-
const simple_exchange_1 = require("./simple-exchange");
|
|
10
|
-
const Bancor_json_1 = __importDefault(require("../abi/Bancor.json"));
|
|
11
|
-
const BANCOR_NETWORK = {
|
|
12
|
-
1: '0x2F9EC37d6CcFFf1caB21733BdaDEdE11c823cCB0',
|
|
13
|
-
};
|
|
14
|
-
const BancorRegistry = {
|
|
15
|
-
1: '0x52ae12abe5d8bd778bd5397f99ca900624cfadd4',
|
|
16
|
-
};
|
|
17
|
-
var BancorFunctions;
|
|
18
|
-
(function (BancorFunctions) {
|
|
19
|
-
BancorFunctions["convert2"] = "convert2";
|
|
20
|
-
})(BancorFunctions || (BancorFunctions = {}));
|
|
21
|
-
class Bancor extends simple_exchange_1.SimpleExchange {
|
|
22
|
-
constructor(dexHelper) {
|
|
23
|
-
super(dexHelper, 'bancor');
|
|
24
|
-
this.exchangeRouterInterface = new abi_1.Interface(Bancor_json_1.default);
|
|
25
|
-
}
|
|
26
|
-
getAdapterParam(srcToken, destToken, srcAmount, destAmount, data, side) {
|
|
27
|
-
if (side === constants_1.SwapSide.BUY)
|
|
28
|
-
throw new Error(`Buy not supported`);
|
|
29
|
-
const { path } = data;
|
|
30
|
-
const payload = this.abiCoder.encodeParameter({
|
|
31
|
-
ParentStruct: {
|
|
32
|
-
path: 'address[]',
|
|
33
|
-
},
|
|
34
|
-
}, { path });
|
|
35
|
-
return {
|
|
36
|
-
targetExchange: BancorRegistry[this.network],
|
|
37
|
-
payload,
|
|
38
|
-
networkFee: '0',
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
async getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
|
|
42
|
-
if (side === constants_1.SwapSide.BUY)
|
|
43
|
-
throw new Error(`Buy not supported`);
|
|
44
|
-
const defaultArgs = [
|
|
45
|
-
data.path,
|
|
46
|
-
srcAmount,
|
|
47
|
-
data.minDestToken || '1',
|
|
48
|
-
constants_1.NULL_ADDRESS,
|
|
49
|
-
'0',
|
|
50
|
-
];
|
|
51
|
-
const swapMethod = BancorFunctions.convert2;
|
|
52
|
-
const swapData = this.exchangeRouterInterface.encodeFunctionData(swapMethod, defaultArgs);
|
|
53
|
-
return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, data.bancorNetwork || BANCOR_NETWORK[this.network]);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.Bancor = Bancor;
|
|
57
|
-
Bancor.dexKeys = ['bancor'];
|
|
58
|
-
//# sourceMappingURL=bancor.js.map
|
package/build/dex/bancor.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bancor.js","sourceRoot":"","sources":["../../src/dex/bancor.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA6D;AAC7D,4CAAsD;AAGtD,uDAAmD;AACnD,qEAA2C;AAI3C,MAAM,cAAc,GAAkC;IACpD,CAAC,EAAE,4CAA4C;CAChD,CAAC;AAEF,MAAM,cAAc,GAAkC;IACpD,CAAC,EAAE,4CAA4C;CAChD,CAAC;AAgBF,IAAK,eAEJ;AAFD,WAAK,eAAe;IAClB,wCAAqB,CAAA;AACvB,CAAC,EAFI,eAAe,KAAf,eAAe,QAEnB;AAED,MAAa,MACX,SAAQ,gCAAc;IAMtB,YAAY,SAAqB;QAC/B,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAC3B,IAAI,CAAC,uBAAuB,GAAG,IAAI,eAAS,CAAC,qBAA2B,CAAC,CAAC;IAC5E,CAAC;IAED,eAAe,CACb,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAgB,EAChB,IAAc;QAEd,IAAI,IAAI,KAAK,oBAAQ,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAEhE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QACtB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAC3C;YACE,YAAY,EAAE;gBACZ,IAAI,EAAE,WAAW;aAClB;SACF,EACD,EAAE,IAAI,EAAE,CACT,CAAC;QAEF,OAAO;YACL,cAAc,EAAE,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC;YAC5C,OAAO;YACP,UAAU,EAAE,GAAG;SAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAgB,EAChB,IAAc;QAEd,IAAI,IAAI,KAAK,oBAAQ,CAAC,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAEhE,MAAM,WAAW,GAAG;YAClB,IAAI,CAAC,IAAI;YACT,SAAS;YACT,IAAI,CAAC,YAAY,IAAI,GAAG;YACxB,wBAAY;YACZ,GAAG;SACJ,CAAC;QACF,MAAM,UAAU,GAAG,eAAe,CAAC,QAAQ,CAAC;QAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAC9D,UAAU,EACV,WAAW,CACZ,CAAC;QAEF,OAAO,IAAI,CAAC,qCAAqC,CAC/C,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,CAAC,aAAa,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CACnD,CAAC;IACJ,CAAC;;AAtEH,wBAuEC;AAnEQ,cAAO,GAAG,CAAC,QAAQ,CAAC,CAAC"}
|
package/build/dex/compound.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Interface } from '@ethersproject/abi';
|
|
2
|
-
import { SwapSide } from '../constants';
|
|
3
|
-
import { AdapterExchangeParam, SimpleExchangeParam } from '../types';
|
|
4
|
-
import { IDexTxBuilder } from './idex';
|
|
5
|
-
import { SimpleExchange } from './simple-exchange';
|
|
6
|
-
import { IDexHelper } from '../dex-helper';
|
|
7
|
-
export declare type CompoundData = {
|
|
8
|
-
fromCToken: boolean;
|
|
9
|
-
};
|
|
10
|
-
declare type CompoundParam = [srcAmount: string];
|
|
11
|
-
export declare class Compound extends SimpleExchange implements IDexTxBuilder<CompoundData, CompoundParam> {
|
|
12
|
-
static dexKeys: string[];
|
|
13
|
-
cethInterface: Interface;
|
|
14
|
-
constructor(dexHelper: IDexHelper);
|
|
15
|
-
getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: CompoundData, side: SwapSide): AdapterExchangeParam;
|
|
16
|
-
getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: CompoundData, side: SwapSide): Promise<SimpleExchangeParam>;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
package/build/dex/compound.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Compound = void 0;
|
|
7
|
-
const abi_1 = require("@ethersproject/abi");
|
|
8
|
-
const constants_1 = require("../constants");
|
|
9
|
-
const simple_exchange_1 = require("./simple-exchange");
|
|
10
|
-
const Compound_CETH_json_1 = __importDefault(require("../abi/Compound_CETH.json")); // CETH abi
|
|
11
|
-
const utils_1 = require("../utils");
|
|
12
|
-
var CompoundFunctions;
|
|
13
|
-
(function (CompoundFunctions) {
|
|
14
|
-
CompoundFunctions["redeem"] = "redeem";
|
|
15
|
-
CompoundFunctions["mint"] = "mint";
|
|
16
|
-
})(CompoundFunctions || (CompoundFunctions = {}));
|
|
17
|
-
class Compound extends simple_exchange_1.SimpleExchange {
|
|
18
|
-
constructor(dexHelper) {
|
|
19
|
-
super(dexHelper, 'compound');
|
|
20
|
-
this.cethInterface = new abi_1.Interface(Compound_CETH_json_1.default);
|
|
21
|
-
}
|
|
22
|
-
getAdapterParam(srcToken, destToken, srcAmount, destAmount, data, side) {
|
|
23
|
-
const cToken = data.fromCToken ? srcToken : destToken; // Warning
|
|
24
|
-
const payload = this.abiCoder.encodeParameter({
|
|
25
|
-
ParentStruct: {
|
|
26
|
-
cToken: 'address',
|
|
27
|
-
},
|
|
28
|
-
}, { cToken });
|
|
29
|
-
return {
|
|
30
|
-
// target exchange is not used by the contract
|
|
31
|
-
targetExchange: constants_1.NULL_ADDRESS,
|
|
32
|
-
payload,
|
|
33
|
-
networkFee: '0',
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
async getSimpleParam(srcToken, destToken, srcAmount, destAmount, data, side) {
|
|
37
|
-
const cToken = data.fromCToken ? srcToken : destToken;
|
|
38
|
-
const swapData = (0, utils_1.isETHAddress)(srcToken)
|
|
39
|
-
? this.cethInterface.encodeFunctionData(CompoundFunctions.mint)
|
|
40
|
-
: this.erc20Interface.encodeFunctionData(data.fromCToken ? CompoundFunctions.redeem : CompoundFunctions.mint, [srcAmount]);
|
|
41
|
-
return this.buildSimpleParamWithoutWETHConversion(srcToken, srcAmount, destToken, destAmount, swapData, cToken, undefined, undefined, undefined, data.fromCToken);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.Compound = Compound;
|
|
45
|
-
Compound.dexKeys = ['compound'];
|
|
46
|
-
//# sourceMappingURL=compound.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compound.js","sourceRoot":"","sources":["../../src/dex/compound.ts"],"names":[],"mappings":";;;;;;AAAA,4CAA6D;AAC7D,4CAAsD;AAGtD,uDAAmD;AACnD,mFAA6C,CAAC,WAAW;AACzD,oCAAwC;AAQxC,IAAK,iBAGJ;AAHD,WAAK,iBAAiB;IACpB,sCAAiB,CAAA;IACjB,kCAAa,CAAA;AACf,CAAC,EAHI,iBAAiB,KAAjB,iBAAiB,QAGrB;AAED,MAAa,QACX,SAAQ,gCAAc;IAMtB,YAAY,SAAqB;QAC/B,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,eAAS,CAAC,4BAAsB,CAAC,CAAC;IAC7D,CAAC;IAED,eAAe,CACb,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAkB,EAClB,IAAc;QAEd,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU;QAEjE,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAC3C;YACE,YAAY,EAAE;gBACZ,MAAM,EAAE,SAAS;aAClB;SACF,EACD,EAAE,MAAM,EAAE,CACX,CAAC;QAEF,OAAO;YACL,8CAA8C;YAC9C,cAAc,EAAE,wBAAY;YAC5B,OAAO;YACP,UAAU,EAAE,GAAG;SAChB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,QAAgB,EAChB,SAAiB,EACjB,SAAiB,EACjB,UAAkB,EAClB,IAAkB,EAClB,IAAc;QAEd,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QACtD,MAAM,QAAQ,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAC;YACrC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,IAAI,CAAC;YAC/D,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CACpC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,IAAI,EACnE,CAAC,SAAS,CAAC,CACZ,CAAC;QAEN,OAAO,IAAI,CAAC,qCAAqC,CAC/C,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,MAAM,EACN,SAAS,EACT,SAAS,EACT,SAAS,EACT,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,CAAC;;AAnEH,4BAoEC;AAhEQ,gBAAO,GAAG,CAAC,UAAU,CAAC,CAAC"}
|
package/build/dex/curve-v2.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { Interface } from '@ethersproject/abi';
|
|
2
|
-
import { SwapSide } from '../constants';
|
|
3
|
-
import { AdapterExchangeParam, Address, ExchangeTxInfo, NumberAsString, PreprocessTransactionOptions, SimpleExchangeParam, Token, TxInfo } from '../types';
|
|
4
|
-
import { IDexTxBuilder } from './idex';
|
|
5
|
-
import { SimpleExchange } from './simple-exchange';
|
|
6
|
-
import { IDexHelper } from '../dex-helper';
|
|
7
|
-
import { Logger } from 'log4js';
|
|
8
|
-
import { OptimalSwapExchange } from '@paraswap/core';
|
|
9
|
-
export declare enum CurveV2SwapType {
|
|
10
|
-
EXCHANGE = 0,
|
|
11
|
-
EXCHANGE_UNDERLYING = 1,
|
|
12
|
-
EXCHANGE_GENERIC_FACTORY_ZAP = 2
|
|
13
|
-
}
|
|
14
|
-
declare type CurveV2Data = {
|
|
15
|
-
i: number;
|
|
16
|
-
j: number;
|
|
17
|
-
exchange: string;
|
|
18
|
-
originalPoolAddress: Address;
|
|
19
|
-
swapType: CurveV2SwapType;
|
|
20
|
-
isApproved?: boolean;
|
|
21
|
-
};
|
|
22
|
-
export declare type DirectCurveV2Param = [
|
|
23
|
-
fromToken: Address,
|
|
24
|
-
toToken: Address,
|
|
25
|
-
exchange: Address,
|
|
26
|
-
poolAddress: Address,
|
|
27
|
-
fromAmount: NumberAsString,
|
|
28
|
-
toAmount: NumberAsString,
|
|
29
|
-
expectedAmount: NumberAsString,
|
|
30
|
-
feePercent: NumberAsString,
|
|
31
|
-
i: NumberAsString,
|
|
32
|
-
j: NumberAsString,
|
|
33
|
-
partner: Address,
|
|
34
|
-
isApproved: boolean,
|
|
35
|
-
swapType: CurveV2SwapType,
|
|
36
|
-
beneficiary: Address,
|
|
37
|
-
needWrapNative: boolean,
|
|
38
|
-
permit: string,
|
|
39
|
-
uuid: string
|
|
40
|
-
];
|
|
41
|
-
export declare class CurveV2 extends SimpleExchange implements IDexTxBuilder<CurveV2Data, DirectCurveV2Param> {
|
|
42
|
-
readonly dexHelper: IDexHelper;
|
|
43
|
-
static dexKeys: string[];
|
|
44
|
-
exchangeRouterInterface: Interface;
|
|
45
|
-
genericFactoryZapIface: Interface;
|
|
46
|
-
minConversionRate: string;
|
|
47
|
-
needWrapNative: boolean;
|
|
48
|
-
logger: Logger;
|
|
49
|
-
readonly directSwapIface: Interface;
|
|
50
|
-
constructor(dexHelper: IDexHelper);
|
|
51
|
-
getAdapterParam(_0: string, _1: string, _2: string, _3: string, data: CurveV2Data, side: SwapSide): AdapterExchangeParam;
|
|
52
|
-
getTokenFromAddress(address: Address): Token;
|
|
53
|
-
preProcessTransaction(optimalSwapExchange: OptimalSwapExchange<CurveV2Data>, srcToken: Token, _0: Token, _1: SwapSide, options: PreprocessTransactionOptions): Promise<[OptimalSwapExchange<CurveV2Data>, ExchangeTxInfo]>;
|
|
54
|
-
getDirectParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, expectedAmount: NumberAsString, data: CurveV2Data, side: SwapSide, permit: string, uuid: string, feePercent: NumberAsString, _0: NumberAsString, partner: string, beneficiary: string, contractMethod?: string): TxInfo<DirectCurveV2Param>;
|
|
55
|
-
static getDirectFunctionName(): string[];
|
|
56
|
-
getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: CurveV2Data, side: SwapSide): Promise<SimpleExchangeParam>;
|
|
57
|
-
}
|
|
58
|
-
export {};
|