@paraswap/dex-lib 4.7.13 → 4.7.14-multi-route.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/build/abi/pharaoh-v3/PharaohV3Factory.abi.json +39 -0
- package/build/abi/pharaoh-v3/PharaohV3Pool.abi.json +802 -0
- package/build/abi/pharaoh-v3/PharaohV3StateMulticall.abi.json +781 -0
- package/build/abi/uniswap-v4/hooks/arena/arena-fee-helper.abi.json +476 -0
- package/build/dex/idle-dao/idle-dao.d.ts +1 -0
- package/build/dex/idle-dao/idle-dao.js +23 -11
- package/build/dex/idle-dao/idle-dao.js.map +1 -1
- package/build/dex/{se-vlr/se-vlr-pool.d.ts → maker-psm/maker-psm-event-pool.d.ts} +15 -11
- package/build/dex/maker-psm/maker-psm-event-pool.js +132 -0
- package/build/dex/maker-psm/maker-psm-event-pool.js.map +1 -0
- package/build/dex/maker-psm/maker-psm.d.ts +4 -41
- package/build/dex/maker-psm/maker-psm.js +40 -143
- package/build/dex/maker-psm/maker-psm.js.map +1 -1
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3-factory.d.ts +7 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3-factory.js +20 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3-factory.js.map +1 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3-pool.d.ts +12 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3-pool.js +139 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3-pool.js.map +1 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3.d.ts +11 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3.js +128 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/pharaoh-v3.js.map +1 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/utils.d.ts +4 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/utils.js +56 -0
- package/build/dex/uniswap-v3/forks/pharaoh-v3/utils.js.map +1 -0
- package/build/dex/uniswap-v4/contract-math/Position.d.ts +6 -0
- package/build/dex/uniswap-v4/contract-math/Position.js +29 -0
- package/build/dex/uniswap-v4/contract-math/Position.js.map +1 -1
- package/build/dex/uniswap-v4/hooks/arena/arena-fee-helper.d.ts +36 -0
- package/build/dex/uniswap-v4/hooks/arena/arena-fee-helper.js +125 -0
- package/build/dex/uniswap-v4/hooks/arena/arena-fee-helper.js.map +1 -0
- package/build/dex/uniswap-v4/hooks/arena/arena-hook.d.ts +21 -0
- package/build/dex/uniswap-v4/hooks/arena/arena-hook.js +93 -0
- package/build/dex/uniswap-v4/hooks/arena/arena-hook.js.map +1 -0
- package/build/dex/uniswap-v4/hooks/arena/config.d.ts +3 -0
- package/build/dex/uniswap-v4/hooks/arena/config.js +11 -0
- package/build/dex/uniswap-v4/hooks/arena/config.js.map +1 -0
- package/build/dex/uniswap-v4/hooks/arena/types.d.ts +5 -0
- package/build/dex/uniswap-v4/hooks/arena/types.js.map +1 -0
- package/build/dex/uniswap-v4/hooks/types.d.ts +60 -0
- package/build/dex/uniswap-v4/hooks/types.js.map +1 -0
- package/build/executor/Executor01BytecodeBuilder.d.ts +5 -5
- package/build/executor/Executor01BytecodeBuilder.js +17 -14
- package/build/executor/Executor01BytecodeBuilder.js.map +1 -1
- package/build/executor/Executor02BytecodeBuilder.d.ts +11 -8
- package/build/executor/Executor02BytecodeBuilder.js +107 -103
- package/build/executor/Executor02BytecodeBuilder.js.map +1 -1
- package/build/executor/Executor03BytecodeBuilder.d.ts +5 -5
- package/build/executor/Executor03BytecodeBuilder.js +14 -11
- package/build/executor/Executor03BytecodeBuilder.js.map +1 -1
- package/build/executor/ExecutorBytecodeBuilder.d.ts +8 -8
- package/build/executor/ExecutorBytecodeBuilder.js +8 -8
- package/build/executor/ExecutorBytecodeBuilder.js.map +1 -1
- package/build/executor/WETHBytecodeBuilder.d.ts +2 -2
- package/build/executor/WETHBytecodeBuilder.js +1 -1
- package/build/executor/WETHBytecodeBuilder.js.map +1 -1
- package/build/executor/types.d.ts +21 -0
- package/build/executor/types.js.map +1 -1
- package/build/executor/utils.d.ts +20 -0
- package/build/executor/utils.js +129 -0
- package/build/executor/utils.js.map +1 -1
- package/build/generic-swap-transaction-builder.d.ts +4 -0
- package/build/generic-swap-transaction-builder.js +134 -52
- package/build/generic-swap-transaction-builder.js.map +1 -1
- package/package.json +12 -3
- package/build/abi/BProtocol.json +0 -1155
- package/build/abi/Jarvis.json +0 -1172
- package/build/abi/MStableAsset.json +0 -1545
- package/build/abi/OneInchLp.json +0 -1304
- package/build/abi/Onebit.json +0 -736
- package/build/abi/Shell.json +0 -1294
- package/build/abi/TraderJoeV2Router.json +0 -50
- package/build/abi/wUSDM.json +0 -757
- package/build/abi/zrx.v2.json +0 -1967
- package/build/abi/zrx.v3.json +0 -3454
- package/build/abi/zrx.v4.json +0 -2193
- package/build/dex/OneInchLp.d.ts +0 -24
- package/build/dex/OneInchLp.js +0 -43
- package/build/dex/OneInchLp.js.map +0 -1
- package/build/dex/bProtocol/bProtocol.d.ts +0 -15
- package/build/dex/bProtocol/bProtocol.js +0 -56
- package/build/dex/bProtocol/bProtocol.js.map +0 -1
- package/build/dex/bProtocol/types.d.ts +0 -11
- package/build/dex/bProtocol/types.js +0 -8
- package/build/dex/bProtocol/types.js.map +0 -1
- package/build/dex/jarvis.d.ts +0 -56
- package/build/dex/jarvis.js +0 -163
- package/build/dex/jarvis.js.map +0 -1
- package/build/dex/mStable.d.ts +0 -44
- package/build/dex/mStable.js +0 -75
- package/build/dex/mStable.js.map +0 -1
- package/build/dex/onebit/onebit.d.ts +0 -16
- package/build/dex/onebit/onebit.js +0 -61
- package/build/dex/onebit/onebit.js.map +0 -1
- package/build/dex/onebit/types.d.ts +0 -14
- package/build/dex/onebit/types.js +0 -8
- package/build/dex/onebit/types.js.map +0 -1
- package/build/dex/se-vlr/config.d.ts +0 -3
- package/build/dex/se-vlr/config.js +0 -24
- package/build/dex/se-vlr/config.js.map +0 -1
- package/build/dex/se-vlr/se-vlr-pool.js +0 -70
- package/build/dex/se-vlr/se-vlr-pool.js.map +0 -1
- package/build/dex/se-vlr/se-vlr.d.ts +0 -35
- package/build/dex/se-vlr/se-vlr.js +0 -131
- package/build/dex/se-vlr/se-vlr.js.map +0 -1
- package/build/dex/se-vlr/types.d.ts +0 -6
- package/build/dex/se-vlr/types.js.map +0 -1
- package/build/dex/shell.d.ts +0 -25
- package/build/dex/shell.js +0 -41
- package/build/dex/shell.js.map +0 -1
- package/build/dex/trader-joe-v2.d.ts +0 -40
- package/build/dex/trader-joe-v2.js +0 -74
- package/build/dex/trader-joe-v2.js.map +0 -1
- package/build/dex/uniswap-v3/uniswap-v3-new.d.ts +0 -94
- package/build/dex/uniswap-v3/uniswap-v3-new.js +0 -923
- package/build/dex/uniswap-v3/uniswap-v3-new.js.map +0 -1
- package/build/dex/usual-bond/config.d.ts +0 -3
- package/build/dex/usual-bond/config.js +0 -13
- package/build/dex/usual-bond/config.js.map +0 -1
- package/build/dex/usual-bond/types.d.ts +0 -7
- package/build/dex/usual-bond/types.js.map +0 -1
- package/build/dex/usual-bond/usual-bond.d.ts +0 -35
- package/build/dex/usual-bond/usual-bond.js +0 -176
- package/build/dex/usual-bond/usual-bond.js.map +0 -1
- package/build/dex/wusdm/config.d.ts +0 -3
- package/build/dex/wusdm/config.js +0 -43
- package/build/dex/wusdm/config.js.map +0 -1
- package/build/dex/wusdm/constants.d.ts +0 -2
- package/build/dex/wusdm/constants.js +0 -6
- package/build/dex/wusdm/constants.js.map +0 -1
- package/build/dex/wusdm/types.d.ts +0 -18
- package/build/dex/wusdm/types.js +0 -11
- package/build/dex/wusdm/types.js.map +0 -1
- package/build/dex/wusdm/wusdm-pool.d.ts +0 -21
- package/build/dex/wusdm/wusdm-pool.js +0 -74
- package/build/dex/wusdm/wusdm-pool.js.map +0 -1
- package/build/dex/wusdm/wusdm.d.ts +0 -46
- package/build/dex/wusdm/wusdm.js +0 -243
- package/build/dex/wusdm/wusdm.js.map +0 -1
- package/build/dex/zerox/config.d.ts +0 -2
- package/build/dex/zerox/config.js +0 -33
- package/build/dex/zerox/config.js.map +0 -1
- package/build/dex/zerox/index.d.ts +0 -22
- package/build/dex/zerox/index.js +0 -225
- package/build/dex/zerox/index.js.map +0 -1
- package/build/dex/zerox/order.d.ts +0 -88
- package/build/dex/zerox/order.js +0 -53
- package/build/dex/zerox/order.js.map +0 -1
- package/build/dex/zerox/types.d.ts +0 -73
- package/build/dex/zerox/types.js +0 -21
- package/build/dex/zerox/types.js.map +0 -1
- /package/build/dex/{se-vlr → uniswap-v4/hooks/arena}/types.js +0 -0
- /package/build/dex/{usual-bond → uniswap-v4/hooks}/types.js +0 -0
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{ "internalType": "address", "name": "_owner", "type": "address" },
|
|
5
|
+
{
|
|
6
|
+
"internalType": "address",
|
|
7
|
+
"name": "_referralRegistry",
|
|
8
|
+
"type": "address"
|
|
9
|
+
},
|
|
10
|
+
{ "internalType": "uint16", "name": "_protocolFeePpm", "type": "uint16" },
|
|
11
|
+
{
|
|
12
|
+
"internalType": "address",
|
|
13
|
+
"name": "_protocolFeeRecipient",
|
|
14
|
+
"type": "address"
|
|
15
|
+
},
|
|
16
|
+
{ "internalType": "uint16", "name": "_referralFeePpm", "type": "uint16" }
|
|
17
|
+
],
|
|
18
|
+
"stateMutability": "nonpayable",
|
|
19
|
+
"type": "constructor"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"inputs": [],
|
|
23
|
+
"name": "FeeArrayLengthExceedsMaxFeeArrayLength",
|
|
24
|
+
"type": "error"
|
|
25
|
+
},
|
|
26
|
+
{ "inputs": [], "name": "FeeRecipientNotFound", "type": "error" },
|
|
27
|
+
{ "inputs": [], "name": "FeeSetterOnly", "type": "error" },
|
|
28
|
+
{ "inputs": [], "name": "FeesAlreadyInitialized", "type": "error" },
|
|
29
|
+
{
|
|
30
|
+
"inputs": [
|
|
31
|
+
{ "internalType": "address", "name": "owner", "type": "address" }
|
|
32
|
+
],
|
|
33
|
+
"name": "OwnableInvalidOwner",
|
|
34
|
+
"type": "error"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"inputs": [
|
|
38
|
+
{ "internalType": "address", "name": "account", "type": "address" }
|
|
39
|
+
],
|
|
40
|
+
"name": "OwnableUnauthorizedAccount",
|
|
41
|
+
"type": "error"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"inputs": [],
|
|
45
|
+
"name": "ProtocolFeePpmMustBeGreaterThanReferralFeePpm",
|
|
46
|
+
"type": "error"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"inputs": [],
|
|
50
|
+
"name": "ProtocolFeePpmMustBeGreaterThanZero",
|
|
51
|
+
"type": "error"
|
|
52
|
+
},
|
|
53
|
+
{ "inputs": [], "name": "RecipientCantBeZeroAddress", "type": "error" },
|
|
54
|
+
{
|
|
55
|
+
"inputs": [],
|
|
56
|
+
"name": "RecipientIndexDoesNotMatchRecipient",
|
|
57
|
+
"type": "error"
|
|
58
|
+
},
|
|
59
|
+
{ "inputs": [], "name": "RecipientIndexOutOfBounds", "type": "error" },
|
|
60
|
+
{ "inputs": [], "name": "TotalFeePpmBelowMinFeePpm", "type": "error" },
|
|
61
|
+
{ "inputs": [], "name": "TotalFeePpmExceedsMaxFeePpm", "type": "error" },
|
|
62
|
+
{
|
|
63
|
+
"anonymous": false,
|
|
64
|
+
"inputs": [
|
|
65
|
+
{
|
|
66
|
+
"indexed": true,
|
|
67
|
+
"internalType": "PoolId",
|
|
68
|
+
"name": "poolId",
|
|
69
|
+
"type": "bytes32"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"components": [
|
|
73
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
74
|
+
{ "internalType": "uint16", "name": "feePpm", "type": "uint16" }
|
|
75
|
+
],
|
|
76
|
+
"indexed": false,
|
|
77
|
+
"internalType": "struct IArenaFeeHelperMinimal.Fee[]",
|
|
78
|
+
"name": "fees",
|
|
79
|
+
"type": "tuple[]"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"name": "FeeArraySet",
|
|
83
|
+
"type": "event"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"anonymous": false,
|
|
87
|
+
"inputs": [
|
|
88
|
+
{
|
|
89
|
+
"indexed": true,
|
|
90
|
+
"internalType": "address",
|
|
91
|
+
"name": "feeSetter",
|
|
92
|
+
"type": "address"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"indexed": false,
|
|
96
|
+
"internalType": "bool",
|
|
97
|
+
"name": "isFeeSetter",
|
|
98
|
+
"type": "bool"
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"name": "FeeSetterSet",
|
|
102
|
+
"type": "event"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"anonymous": false,
|
|
106
|
+
"inputs": [
|
|
107
|
+
{
|
|
108
|
+
"indexed": true,
|
|
109
|
+
"internalType": "address",
|
|
110
|
+
"name": "previousOwner",
|
|
111
|
+
"type": "address"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"indexed": true,
|
|
115
|
+
"internalType": "address",
|
|
116
|
+
"name": "newOwner",
|
|
117
|
+
"type": "address"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"name": "OwnershipTransferStarted",
|
|
121
|
+
"type": "event"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"anonymous": false,
|
|
125
|
+
"inputs": [
|
|
126
|
+
{
|
|
127
|
+
"indexed": true,
|
|
128
|
+
"internalType": "address",
|
|
129
|
+
"name": "previousOwner",
|
|
130
|
+
"type": "address"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"indexed": true,
|
|
134
|
+
"internalType": "address",
|
|
135
|
+
"name": "newOwner",
|
|
136
|
+
"type": "address"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"name": "OwnershipTransferred",
|
|
140
|
+
"type": "event"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"anonymous": false,
|
|
144
|
+
"inputs": [
|
|
145
|
+
{
|
|
146
|
+
"components": [
|
|
147
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
148
|
+
{
|
|
149
|
+
"internalType": "uint16",
|
|
150
|
+
"name": "protocolFeePpm",
|
|
151
|
+
"type": "uint16"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"internalType": "uint16",
|
|
155
|
+
"name": "referralFeePpm",
|
|
156
|
+
"type": "uint16"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"indexed": false,
|
|
160
|
+
"internalType": "struct ArenaFeeHelper.ProtocolFeeSettings",
|
|
161
|
+
"name": "settings",
|
|
162
|
+
"type": "tuple"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"name": "ProtocolFeeSettingsSet",
|
|
166
|
+
"type": "event"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"anonymous": false,
|
|
170
|
+
"inputs": [
|
|
171
|
+
{
|
|
172
|
+
"indexed": false,
|
|
173
|
+
"internalType": "address",
|
|
174
|
+
"name": "referralRegistry",
|
|
175
|
+
"type": "address"
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"name": "ReferralRegistrySet",
|
|
179
|
+
"type": "event"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"inputs": [],
|
|
183
|
+
"name": "MAX_FEE_ARRAY_LENGTH",
|
|
184
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
185
|
+
"stateMutability": "view",
|
|
186
|
+
"type": "function"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"inputs": [],
|
|
190
|
+
"name": "MAX_POOL_FEE_PPM",
|
|
191
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
192
|
+
"stateMutability": "view",
|
|
193
|
+
"type": "function"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"inputs": [],
|
|
197
|
+
"name": "MAX_PROTOCOL_FEE_PPM",
|
|
198
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
199
|
+
"stateMutability": "view",
|
|
200
|
+
"type": "function"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"inputs": [],
|
|
204
|
+
"name": "acceptOwnership",
|
|
205
|
+
"outputs": [],
|
|
206
|
+
"stateMutability": "nonpayable",
|
|
207
|
+
"type": "function"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"inputs": [
|
|
211
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" },
|
|
212
|
+
{ "internalType": "address", "name": "_recipient", "type": "address" },
|
|
213
|
+
{ "internalType": "uint16", "name": "_feePpm", "type": "uint16" }
|
|
214
|
+
],
|
|
215
|
+
"name": "addFeeRecipient",
|
|
216
|
+
"outputs": [],
|
|
217
|
+
"stateMutability": "nonpayable",
|
|
218
|
+
"type": "function"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"inputs": [
|
|
222
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" }
|
|
223
|
+
],
|
|
224
|
+
"name": "getFeesForPool",
|
|
225
|
+
"outputs": [
|
|
226
|
+
{
|
|
227
|
+
"components": [
|
|
228
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
229
|
+
{ "internalType": "uint16", "name": "feePpm", "type": "uint16" }
|
|
230
|
+
],
|
|
231
|
+
"internalType": "struct IArenaFeeHelperMinimal.Fee[]",
|
|
232
|
+
"name": "feeRecipients",
|
|
233
|
+
"type": "tuple[]"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"stateMutability": "view",
|
|
237
|
+
"type": "function"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"inputs": [],
|
|
241
|
+
"name": "getProtocolFeeSettings",
|
|
242
|
+
"outputs": [
|
|
243
|
+
{
|
|
244
|
+
"components": [
|
|
245
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
246
|
+
{
|
|
247
|
+
"internalType": "uint16",
|
|
248
|
+
"name": "protocolFeePpm",
|
|
249
|
+
"type": "uint16"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"internalType": "uint16",
|
|
253
|
+
"name": "referralFeePpm",
|
|
254
|
+
"type": "uint16"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"internalType": "struct ArenaFeeHelper.ProtocolFeeSettings",
|
|
258
|
+
"name": "",
|
|
259
|
+
"type": "tuple"
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"stateMutability": "view",
|
|
263
|
+
"type": "function"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"inputs": [
|
|
267
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" }
|
|
268
|
+
],
|
|
269
|
+
"name": "getTotalFeePpm",
|
|
270
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
271
|
+
"stateMutability": "view",
|
|
272
|
+
"type": "function"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"inputs": [
|
|
276
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" },
|
|
277
|
+
{
|
|
278
|
+
"components": [
|
|
279
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
280
|
+
{ "internalType": "uint16", "name": "feePpm", "type": "uint16" }
|
|
281
|
+
],
|
|
282
|
+
"internalType": "struct IArenaFeeHelperMinimal.Fee[]",
|
|
283
|
+
"name": "_fees",
|
|
284
|
+
"type": "tuple[]"
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
"name": "initializeFeesForPool",
|
|
288
|
+
"outputs": [],
|
|
289
|
+
"stateMutability": "nonpayable",
|
|
290
|
+
"type": "function"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"inputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
294
|
+
"name": "isFeeSetter",
|
|
295
|
+
"outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
|
|
296
|
+
"stateMutability": "view",
|
|
297
|
+
"type": "function"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"inputs": [],
|
|
301
|
+
"name": "owner",
|
|
302
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
303
|
+
"stateMutability": "view",
|
|
304
|
+
"type": "function"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"inputs": [],
|
|
308
|
+
"name": "pendingOwner",
|
|
309
|
+
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
|
|
310
|
+
"stateMutability": "view",
|
|
311
|
+
"type": "function"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"inputs": [
|
|
315
|
+
{ "internalType": "PoolId", "name": "", "type": "bytes32" },
|
|
316
|
+
{ "internalType": "uint256", "name": "", "type": "uint256" }
|
|
317
|
+
],
|
|
318
|
+
"name": "poolIdToFees",
|
|
319
|
+
"outputs": [
|
|
320
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
321
|
+
{ "internalType": "uint16", "name": "feePpm", "type": "uint16" }
|
|
322
|
+
],
|
|
323
|
+
"stateMutability": "view",
|
|
324
|
+
"type": "function"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"inputs": [{ "internalType": "PoolId", "name": "", "type": "bytes32" }],
|
|
328
|
+
"name": "poolIdToTotalFeePpm",
|
|
329
|
+
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
|
|
330
|
+
"stateMutability": "view",
|
|
331
|
+
"type": "function"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"inputs": [],
|
|
335
|
+
"name": "protocolFeeSettings",
|
|
336
|
+
"outputs": [
|
|
337
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
338
|
+
{ "internalType": "uint16", "name": "protocolFeePpm", "type": "uint16" },
|
|
339
|
+
{ "internalType": "uint16", "name": "referralFeePpm", "type": "uint16" }
|
|
340
|
+
],
|
|
341
|
+
"stateMutability": "view",
|
|
342
|
+
"type": "function"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"inputs": [],
|
|
346
|
+
"name": "referralRegistry",
|
|
347
|
+
"outputs": [
|
|
348
|
+
{
|
|
349
|
+
"internalType": "contract IArenaReferralRegistry",
|
|
350
|
+
"name": "",
|
|
351
|
+
"type": "address"
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
"stateMutability": "view",
|
|
355
|
+
"type": "function"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"inputs": [
|
|
359
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" },
|
|
360
|
+
{ "internalType": "address", "name": "_recipient", "type": "address" },
|
|
361
|
+
{
|
|
362
|
+
"internalType": "uint256",
|
|
363
|
+
"name": "_recipientIndex",
|
|
364
|
+
"type": "uint256"
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
"name": "removeFeeRecipient",
|
|
368
|
+
"outputs": [],
|
|
369
|
+
"stateMutability": "nonpayable",
|
|
370
|
+
"type": "function"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"inputs": [],
|
|
374
|
+
"name": "renounceOwnership",
|
|
375
|
+
"outputs": [],
|
|
376
|
+
"stateMutability": "nonpayable",
|
|
377
|
+
"type": "function"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"inputs": [
|
|
381
|
+
{ "internalType": "address", "name": "_feeSetter", "type": "address" },
|
|
382
|
+
{ "internalType": "bool", "name": "_isFeeSetter", "type": "bool" }
|
|
383
|
+
],
|
|
384
|
+
"name": "setFeeSetter",
|
|
385
|
+
"outputs": [],
|
|
386
|
+
"stateMutability": "nonpayable",
|
|
387
|
+
"type": "function"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"inputs": [
|
|
391
|
+
{ "internalType": "address", "name": "_recipient", "type": "address" },
|
|
392
|
+
{ "internalType": "uint16", "name": "_protocolFeePpm", "type": "uint16" },
|
|
393
|
+
{ "internalType": "uint16", "name": "_referralFeePpm", "type": "uint16" }
|
|
394
|
+
],
|
|
395
|
+
"name": "setProtocolFeeSettings",
|
|
396
|
+
"outputs": [],
|
|
397
|
+
"stateMutability": "nonpayable",
|
|
398
|
+
"type": "function"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"inputs": [
|
|
402
|
+
{
|
|
403
|
+
"internalType": "address",
|
|
404
|
+
"name": "_referralRegistry",
|
|
405
|
+
"type": "address"
|
|
406
|
+
}
|
|
407
|
+
],
|
|
408
|
+
"name": "setReferralRegistry",
|
|
409
|
+
"outputs": [],
|
|
410
|
+
"stateMutability": "nonpayable",
|
|
411
|
+
"type": "function"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"inputs": [
|
|
415
|
+
{ "internalType": "address", "name": "newOwner", "type": "address" }
|
|
416
|
+
],
|
|
417
|
+
"name": "transferOwnership",
|
|
418
|
+
"outputs": [],
|
|
419
|
+
"stateMutability": "nonpayable",
|
|
420
|
+
"type": "function"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"inputs": [
|
|
424
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" },
|
|
425
|
+
{
|
|
426
|
+
"components": [
|
|
427
|
+
{ "internalType": "address", "name": "recipient", "type": "address" },
|
|
428
|
+
{ "internalType": "uint16", "name": "feePpm", "type": "uint16" }
|
|
429
|
+
],
|
|
430
|
+
"internalType": "struct IArenaFeeHelperMinimal.Fee[]",
|
|
431
|
+
"name": "_fees",
|
|
432
|
+
"type": "tuple[]"
|
|
433
|
+
}
|
|
434
|
+
],
|
|
435
|
+
"name": "updateFeesForPool",
|
|
436
|
+
"outputs": [],
|
|
437
|
+
"stateMutability": "nonpayable",
|
|
438
|
+
"type": "function"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"inputs": [
|
|
442
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" },
|
|
443
|
+
{
|
|
444
|
+
"internalType": "address",
|
|
445
|
+
"name": "_recipientToReplace",
|
|
446
|
+
"type": "address"
|
|
447
|
+
},
|
|
448
|
+
{ "internalType": "address", "name": "_newRecipient", "type": "address" },
|
|
449
|
+
{
|
|
450
|
+
"internalType": "uint256",
|
|
451
|
+
"name": "_recipientIndex",
|
|
452
|
+
"type": "uint256"
|
|
453
|
+
}
|
|
454
|
+
],
|
|
455
|
+
"name": "updateRecipientAddress",
|
|
456
|
+
"outputs": [],
|
|
457
|
+
"stateMutability": "nonpayable",
|
|
458
|
+
"type": "function"
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"inputs": [
|
|
462
|
+
{ "internalType": "PoolId", "name": "poolId", "type": "bytes32" },
|
|
463
|
+
{ "internalType": "address", "name": "_recipient", "type": "address" },
|
|
464
|
+
{ "internalType": "uint16", "name": "_feePpm", "type": "uint16" },
|
|
465
|
+
{
|
|
466
|
+
"internalType": "uint256",
|
|
467
|
+
"name": "_recipientIndex",
|
|
468
|
+
"type": "uint256"
|
|
469
|
+
}
|
|
470
|
+
],
|
|
471
|
+
"name": "updateRecipientFeePpm",
|
|
472
|
+
"outputs": [],
|
|
473
|
+
"stateMutability": "nonpayable",
|
|
474
|
+
"type": "function"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
@@ -38,5 +38,6 @@ export declare class IdleDao extends SimpleExchange implements IDex<IdleDaoData>
|
|
|
38
38
|
getCalldataGasCost(poolPrices: PoolPrices<IdleDaoData>): number | number[];
|
|
39
39
|
getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: IdleDaoData, side: SwapSide): AdapterExchangeParam;
|
|
40
40
|
getDexParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, recipient: Address, data: IdleDaoData, side: SwapSide, _: Context, executorAddress: Address): DexExchangeParam;
|
|
41
|
+
updatePoolState(): Promise<void>;
|
|
41
42
|
getTopPoolsForToken(tokenAddress: Address, limit: number): Promise<PoolLiquidity[]>;
|
|
42
43
|
}
|
|
@@ -242,25 +242,36 @@ class IdleDao extends simple_exchange_1.SimpleExchange {
|
|
|
242
242
|
skipApproval: data.fromIdleToken,
|
|
243
243
|
};
|
|
244
244
|
}
|
|
245
|
-
async
|
|
245
|
+
async updatePoolState() {
|
|
246
246
|
await this.initializeTokens();
|
|
247
|
+
}
|
|
248
|
+
async getTopPoolsForToken(tokenAddress, limit) {
|
|
247
249
|
const idleTokens = (0, tokens_1.getPoolsByTokenAddress)(this.network, tokenAddress);
|
|
248
250
|
if (idleTokens.length > 0) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
251
|
+
const poolMap = {};
|
|
252
|
+
idleTokens.forEach((idleToken) => {
|
|
253
|
+
const cdoAddress = idleToken.cdoAddress;
|
|
254
|
+
const token = (0, tokens_1.getTokenFromIdleToken)(idleToken);
|
|
255
|
+
if (!poolMap[cdoAddress]) {
|
|
256
|
+
poolMap[cdoAddress] = {
|
|
257
|
+
exchange: this.dexKey,
|
|
258
|
+
address: cdoAddress,
|
|
259
|
+
connectorTokens: [token],
|
|
260
|
+
liquidityUSD: constants_1.UNLIMITED_USD_LIQUIDITY,
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
if (!poolMap[cdoAddress].connectorTokens.some(t => t.address.toLowerCase() === token.address.toLowerCase())) {
|
|
265
|
+
poolMap[cdoAddress].connectorTokens.push(token);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
return Object.values(poolMap);
|
|
258
270
|
}
|
|
259
271
|
const idleToken = (0, tokens_1.getIdleTokenByAddress)(this.network, tokenAddress.toLowerCase());
|
|
260
272
|
if (idleToken) {
|
|
261
273
|
return [
|
|
262
274
|
{
|
|
263
|
-
liquidityUSD: 1e9,
|
|
264
275
|
exchange: this.dexKey,
|
|
265
276
|
address: idleToken.cdoAddress,
|
|
266
277
|
connectorTokens: [
|
|
@@ -269,6 +280,7 @@ class IdleDao extends simple_exchange_1.SimpleExchange {
|
|
|
269
280
|
decimals: idleToken.decimals,
|
|
270
281
|
},
|
|
271
282
|
],
|
|
283
|
+
liquidityUSD: constants_1.UNLIMITED_USD_LIQUIDITY,
|
|
272
284
|
},
|
|
273
285
|
];
|
|
274
286
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idle-dao.js","sourceRoot":"","sources":["../../../src/dex/idle-dao/idle-dao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"idle-dao.js","sourceRoot":"","sources":["../../../src/dex/idle-dao/idle-dao.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAoD;AACpD,4CAA+C;AAY/C,+CAKyB;AACzB,2EAA6D;AAC7D,uCAAkE;AAGlE,mCAAuE;AACvE,wDAAoD;AACpD,qCAA4C;AAC5C,mCAA6C;AAC7C,qCAMkB;AAClB,qGAAmE;AACnE,qFAAuD;AACvD,gDAAmE;AAEtD,QAAA,oBAAoB,GAAG,YAAY,CAAC;AACjD,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE5C,MAAa,OAAQ,SAAQ,gCAAc;IAkB9B;IACA;IACA;IACC;IACA;IArBH,4BAA4B,GAAG,KAAK,CAAC;IACrC,cAAc,GAAG,IAAI,CAAC;IAEtB,wBAAwB,GAAG,KAAK,CAAC;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AO;4BAC1B,QAAQ,EAAE,SAAS,CAAC,QAAQ;yBAC7B;qBACF;oBACD,YAAY,EAAE,mCAAuB;iBACtC;aACF,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC;;AA/XH,0BAgYC"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
import { Interface } from '@ethersproject/abi';
|
|
2
1
|
import { DeepReadonly } from 'ts-essentials';
|
|
3
|
-
import { Log, Logger } from '../../types';
|
|
2
|
+
import { Address, Log, Logger } from '../../types';
|
|
4
3
|
import { StatefulEventSubscriber } from '../../stateful-event-subscriber';
|
|
5
4
|
import { IDexHelper } from '../../dex-helper/idex-helper';
|
|
6
|
-
import { PoolState } from './types';
|
|
7
|
-
export declare class
|
|
8
|
-
readonly parentName: string;
|
|
5
|
+
import { PoolState, PoolConfig } from './types';
|
|
6
|
+
export declare class MakerPsmEventPool extends StatefulEventSubscriber<PoolState> {
|
|
9
7
|
protected network: number;
|
|
10
8
|
protected dexHelper: IDexHelper;
|
|
11
|
-
|
|
9
|
+
poolConfig: PoolConfig;
|
|
10
|
+
protected vatAddress: Address;
|
|
12
11
|
handlers: {
|
|
13
|
-
[event: string]: (event: any,
|
|
12
|
+
[event: string]: (event: any, pool: PoolState, log: Log) => PoolState;
|
|
14
13
|
};
|
|
15
14
|
logDecoder: (log: Log) => any;
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
to18ConversionFactor: bigint;
|
|
16
|
+
bytes32Tout: string;
|
|
17
|
+
bytes32Tin: string;
|
|
18
|
+
constructor(parentName: string, network: number, dexHelper: IDexHelper, logger: Logger, poolConfig: PoolConfig, vatAddress: Address);
|
|
19
|
+
handleFile(event: any, pool: PoolState, log: Log): PoolState;
|
|
20
|
+
handleSellGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
21
|
+
handleBuyGem(event: any, pool: PoolState, log: Log): PoolState;
|
|
22
|
+
getIdentifier(): string;
|
|
18
23
|
/**
|
|
19
24
|
* The function is called every time any of the subscribed
|
|
20
25
|
* addresses release log. The function accepts the current
|
|
@@ -34,6 +39,5 @@ export declare class SeVlrEventPool extends StatefulEventSubscriber<PoolState> {
|
|
|
34
39
|
* should be generated
|
|
35
40
|
* @returns state of the event subscriber at blocknumber
|
|
36
41
|
*/
|
|
37
|
-
generateState(blockNumber: number): Promise<
|
|
38
|
-
handleMyEvent(event: any, state: DeepReadonly<PoolState>, log: Readonly<Log>): DeepReadonly<PoolState> | null;
|
|
42
|
+
generateState(blockNumber: number): Promise<Readonly<PoolState>>;
|
|
39
43
|
}
|