@pendle/core-v2 5.4.2 → 5.4.4
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/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol/PendleMultiTokenMerkleDistributor.json +462 -0
- package/build/artifacts/contracts/interfaces/IPActionAddRemoveLiqV3.sol/IPActionAddRemoveLiqV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMarketAuxStatic.sol/IPActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionMiscV3.sol/IPActionMiscV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSimple.sol/IPActionSimple.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageStatic.sol/IPActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionStorageV4.sol/IPActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapPTV3.sol/IPActionSwapPTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPActionSwapYTV3.sol/IPActionSwapYTV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllActionV3.sol/IPAllActionV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionAddRemoveLiqV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionMiscV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionStorageEvents.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapPTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPActionSwapYTV3Events.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPAllEventsV3.sol/IPAllEventsV3.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.dbg.json +4 -0
- package/build/artifacts/contracts/interfaces/IPMultiTokenMerkleDistributor.sol/IPMultiTokenMerkleDistributor.json +251 -0
- package/build/artifacts/contracts/interfaces/IPRouterStatic.sol/IPRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/PendlePoolDeployHelper.sol/PendlePoolDeployHelper.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/PendleRouterStatic.sol/PendleRouterStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionInfoStatic.sol/ActionInfoStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketAuxStatic.sol/ActionMarketAuxStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMarketCoreStatic.sol/ActionMarketCoreStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionMintRedeemStatic.sol/ActionMintRedeemStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionStorageStatic.sol/ActionStorageStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/ActionVePendleStatic.sol/ActionVePendleStatic.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtInLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/MarketApproxLibV1.sol/MarketApproxPtOutLibV1.dbg.json +1 -1
- package/build/artifacts/contracts/offchain-helpers/router-static/base/StorageLayout.sol/StorageLayout.dbg.json +1 -1
- package/build/artifacts/contracts/router/ActionStorageV4.sol/ActionStorageV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/PendleRouterV4.sol/PendleRouterV4.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionBase.sol/ActionBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/base/ActionDelegateBase.sol/ActionDelegateBase.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/ApproxStateLib.sol/ApproxStateLib.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtInLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibOnchain.sol/MarketApproxPtOutLibOnchain.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtInLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/math/MarketApproxLibV2.sol/MarketApproxPtOutLibV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/IPSwapAggregator.sol/IPSwapAggregator.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IKyberScalingHelper.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/IOdosRouterV2.dbg.json +1 -1
- package/build/artifacts/contracts/router/swap-aggregator/PendleSwap.sol/PendleSwap.dbg.json +1 -1
- package/contracts/LiquidityMining/PendleMultiTokenMerkleDistributor.sol +117 -0
- package/contracts/interfaces/IPMultiTokenMerkleDistributor.sol +33 -0
- package/deployments/1-core.json +1 -0
- package/deployments/10-core.json +1 -0
- package/deployments/42161-core.json +1 -0
- package/deployments/5000-core.json +1 -0
- package/deployments/56-core.json +1 -0
- package/deployments/8453-core.json +1 -0
- package/package.json +1 -1
- package/typechain-types/IPMultiTokenMerkleDistributor.ts +363 -0
- package/typechain-types/PendleMultiTokenMerkleDistributor.ts +677 -0
- package/typechain-types/factories/IPMultiTokenMerkleDistributor__factory.ts +270 -0
- package/typechain-types/factories/PendleMultiTokenMerkleDistributor__factory.ts +523 -0
- package/typechain-types/hardhat.d.ts +18 -9
- package/typechain-types/index.ts +4 -2
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "IPMultiTokenMerkleDistributor",
|
|
4
|
+
"sourceName": "contracts/interfaces/IPMultiTokenMerkleDistributor.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [],
|
|
8
|
+
"name": "InvalidMerkleProof",
|
|
9
|
+
"type": "error"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"anonymous": false,
|
|
13
|
+
"inputs": [
|
|
14
|
+
{
|
|
15
|
+
"indexed": true,
|
|
16
|
+
"internalType": "address",
|
|
17
|
+
"name": "token",
|
|
18
|
+
"type": "address"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"indexed": true,
|
|
22
|
+
"internalType": "address",
|
|
23
|
+
"name": "user",
|
|
24
|
+
"type": "address"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"indexed": true,
|
|
28
|
+
"internalType": "address",
|
|
29
|
+
"name": "receiver",
|
|
30
|
+
"type": "address"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"indexed": false,
|
|
34
|
+
"internalType": "uint256",
|
|
35
|
+
"name": "amount",
|
|
36
|
+
"type": "uint256"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"name": "Claimed",
|
|
40
|
+
"type": "event"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"anonymous": false,
|
|
44
|
+
"inputs": [
|
|
45
|
+
{
|
|
46
|
+
"indexed": false,
|
|
47
|
+
"internalType": "address[]",
|
|
48
|
+
"name": "defaultTokenList",
|
|
49
|
+
"type": "address[]"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"name": "SetDefaultTokenList",
|
|
53
|
+
"type": "event"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"anonymous": false,
|
|
57
|
+
"inputs": [
|
|
58
|
+
{
|
|
59
|
+
"indexed": true,
|
|
60
|
+
"internalType": "bytes32",
|
|
61
|
+
"name": "merkleRoot",
|
|
62
|
+
"type": "bytes32"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"name": "SetMerkleRoot",
|
|
66
|
+
"type": "event"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"anonymous": false,
|
|
70
|
+
"inputs": [
|
|
71
|
+
{
|
|
72
|
+
"indexed": true,
|
|
73
|
+
"internalType": "address",
|
|
74
|
+
"name": "token",
|
|
75
|
+
"type": "address"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"indexed": true,
|
|
79
|
+
"internalType": "address",
|
|
80
|
+
"name": "user",
|
|
81
|
+
"type": "address"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"indexed": false,
|
|
85
|
+
"internalType": "uint256",
|
|
86
|
+
"name": "amountClaimable",
|
|
87
|
+
"type": "uint256"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"name": "Verified",
|
|
91
|
+
"type": "event"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"inputs": [
|
|
95
|
+
{
|
|
96
|
+
"internalType": "address",
|
|
97
|
+
"name": "receiver",
|
|
98
|
+
"type": "address"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"internalType": "address[]",
|
|
102
|
+
"name": "tokens",
|
|
103
|
+
"type": "address[]"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"internalType": "uint256[]",
|
|
107
|
+
"name": "totalAccrueds",
|
|
108
|
+
"type": "uint256[]"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"internalType": "bytes32[][]",
|
|
112
|
+
"name": "proofs",
|
|
113
|
+
"type": "bytes32[][]"
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
"name": "claim",
|
|
117
|
+
"outputs": [
|
|
118
|
+
{
|
|
119
|
+
"internalType": "uint256[]",
|
|
120
|
+
"name": "amountOuts",
|
|
121
|
+
"type": "uint256[]"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"stateMutability": "nonpayable",
|
|
125
|
+
"type": "function"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"inputs": [
|
|
129
|
+
{
|
|
130
|
+
"internalType": "address",
|
|
131
|
+
"name": "receiver",
|
|
132
|
+
"type": "address"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"internalType": "address[]",
|
|
136
|
+
"name": "tokens",
|
|
137
|
+
"type": "address[]"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"name": "claimVerified",
|
|
141
|
+
"outputs": [
|
|
142
|
+
{
|
|
143
|
+
"internalType": "uint256[]",
|
|
144
|
+
"name": "amountOuts",
|
|
145
|
+
"type": "uint256[]"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"stateMutability": "nonpayable",
|
|
149
|
+
"type": "function"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"inputs": [
|
|
153
|
+
{
|
|
154
|
+
"internalType": "address",
|
|
155
|
+
"name": "token",
|
|
156
|
+
"type": "address"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"internalType": "address",
|
|
160
|
+
"name": "user",
|
|
161
|
+
"type": "address"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"name": "claimed",
|
|
165
|
+
"outputs": [
|
|
166
|
+
{
|
|
167
|
+
"internalType": "uint256",
|
|
168
|
+
"name": "",
|
|
169
|
+
"type": "uint256"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"stateMutability": "view",
|
|
173
|
+
"type": "function"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"inputs": [],
|
|
177
|
+
"name": "merkleRoot",
|
|
178
|
+
"outputs": [
|
|
179
|
+
{
|
|
180
|
+
"internalType": "bytes32",
|
|
181
|
+
"name": "",
|
|
182
|
+
"type": "bytes32"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"stateMutability": "view",
|
|
186
|
+
"type": "function"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"inputs": [
|
|
190
|
+
{
|
|
191
|
+
"internalType": "address",
|
|
192
|
+
"name": "token",
|
|
193
|
+
"type": "address"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"internalType": "address",
|
|
197
|
+
"name": "user",
|
|
198
|
+
"type": "address"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"name": "verified",
|
|
202
|
+
"outputs": [
|
|
203
|
+
{
|
|
204
|
+
"internalType": "uint256",
|
|
205
|
+
"name": "",
|
|
206
|
+
"type": "uint256"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"stateMutability": "view",
|
|
210
|
+
"type": "function"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"inputs": [
|
|
214
|
+
{
|
|
215
|
+
"internalType": "address",
|
|
216
|
+
"name": "user",
|
|
217
|
+
"type": "address"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"internalType": "address[]",
|
|
221
|
+
"name": "tokens",
|
|
222
|
+
"type": "address[]"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"internalType": "uint256[]",
|
|
226
|
+
"name": "totalAccrueds",
|
|
227
|
+
"type": "uint256[]"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"internalType": "bytes32[][]",
|
|
231
|
+
"name": "proofs",
|
|
232
|
+
"type": "bytes32[][]"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"name": "verify",
|
|
236
|
+
"outputs": [
|
|
237
|
+
{
|
|
238
|
+
"internalType": "uint256[]",
|
|
239
|
+
"name": "amountClaimable",
|
|
240
|
+
"type": "uint256[]"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"stateMutability": "nonpayable",
|
|
244
|
+
"type": "function"
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
"bytecode": "0x",
|
|
248
|
+
"deployedBytecode": "0x",
|
|
249
|
+
"linkReferences": {},
|
|
250
|
+
"deployedLinkReferences": {}
|
|
251
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.17;
|
|
3
|
+
|
|
4
|
+
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
|
|
5
|
+
import "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol";
|
|
6
|
+
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
|
|
7
|
+
import "../core/libraries/BoringOwnableUpgradeable.sol";
|
|
8
|
+
import "../core/libraries/TokenHelper.sol";
|
|
9
|
+
import "../core/libraries/Errors.sol";
|
|
10
|
+
import "../interfaces/IPMultiTokenMerkleDistributor.sol";
|
|
11
|
+
|
|
12
|
+
contract PendleMultiTokenMerkleDistributor is
|
|
13
|
+
IPMultiTokenMerkleDistributor,
|
|
14
|
+
UUPSUpgradeable,
|
|
15
|
+
BoringOwnableUpgradeable,
|
|
16
|
+
TokenHelper
|
|
17
|
+
{
|
|
18
|
+
bytes32 public merkleRoot;
|
|
19
|
+
|
|
20
|
+
/// (token, user) => amount
|
|
21
|
+
mapping(address => mapping(address => uint256)) public claimed;
|
|
22
|
+
mapping(address => mapping(address => uint256)) public verified;
|
|
23
|
+
|
|
24
|
+
constructor() {
|
|
25
|
+
_disableInitializers();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
receive() external payable {}
|
|
29
|
+
|
|
30
|
+
function initialize() external initializer {
|
|
31
|
+
__BoringOwnable_init();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function claim(
|
|
35
|
+
address receiver,
|
|
36
|
+
address[] memory tokens,
|
|
37
|
+
uint256[] memory totalAccrueds,
|
|
38
|
+
bytes32[][] memory proofs
|
|
39
|
+
) external returns (uint256[] memory amountOuts) {
|
|
40
|
+
if (tokens.length != totalAccrueds.length || tokens.length != proofs.length) {
|
|
41
|
+
revert Errors.ArrayLengthMismatch();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
address user = msg.sender;
|
|
45
|
+
uint256 nToken = tokens.length;
|
|
46
|
+
amountOuts = new uint256[](nToken);
|
|
47
|
+
|
|
48
|
+
for (uint256 i = 0; i < nToken; ++i) {
|
|
49
|
+
(address token, uint256 totalAccrued, bytes32[] memory proof) = (tokens[i], totalAccrueds[i], proofs[i]);
|
|
50
|
+
if (!_verifyMerkleData(token, user, totalAccrued, proof)) revert InvalidMerkleProof();
|
|
51
|
+
|
|
52
|
+
amountOuts[i] = totalAccrued - claimed[token][user];
|
|
53
|
+
claimed[token][user] = totalAccrued;
|
|
54
|
+
|
|
55
|
+
_transferOut(token, receiver, amountOuts[i]);
|
|
56
|
+
emit Claimed(token, user, receiver, amountOuts[i]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function claimVerified(address receiver, address[] memory tokens) external returns (uint256[] memory amountOuts) {
|
|
61
|
+
address user = msg.sender;
|
|
62
|
+
uint256 nToken = tokens.length;
|
|
63
|
+
amountOuts = new uint256[](nToken);
|
|
64
|
+
|
|
65
|
+
for (uint256 i = 0; i < nToken; ++i) {
|
|
66
|
+
address token = tokens[i];
|
|
67
|
+
uint256 amountVerified = verified[token][user];
|
|
68
|
+
uint256 amountClaimed = claimed[token][user];
|
|
69
|
+
|
|
70
|
+
if (amountVerified > amountClaimed) {
|
|
71
|
+
amountOuts[i] = amountVerified - amountClaimed;
|
|
72
|
+
claimed[token][user] = amountVerified;
|
|
73
|
+
_transferOut(token, receiver, amountOuts[i]);
|
|
74
|
+
emit Claimed(token, user, receiver, amountOuts[i]);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function verify(
|
|
80
|
+
address user,
|
|
81
|
+
address[] memory tokens,
|
|
82
|
+
uint256[] memory totalAccrueds,
|
|
83
|
+
bytes32[][] memory proofs
|
|
84
|
+
) external returns (uint256[] memory amountClaimable) {
|
|
85
|
+
uint256 nToken = tokens.length;
|
|
86
|
+
amountClaimable = new uint256[](nToken);
|
|
87
|
+
|
|
88
|
+
for (uint256 i = 0; i < nToken; ++i) {
|
|
89
|
+
(address token, uint256 totalAccrued, bytes32[] memory proof) = (tokens[i], totalAccrueds[i], proofs[i]);
|
|
90
|
+
if (!_verifyMerkleData(token, user, totalAccrued, proof)) revert InvalidMerkleProof();
|
|
91
|
+
amountClaimable[i] = totalAccrued - claimed[token][user];
|
|
92
|
+
verified[token][user] = totalAccrued;
|
|
93
|
+
emit Verified(token, user, amountClaimable[i]);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function _verifyMerkleData(
|
|
98
|
+
address token,
|
|
99
|
+
address user,
|
|
100
|
+
uint256 amount,
|
|
101
|
+
bytes32[] memory proof
|
|
102
|
+
) internal view returns (bool) {
|
|
103
|
+
bytes32 leaf = keccak256(abi.encodePacked(token, user, amount));
|
|
104
|
+
return MerkleProof.verify(proof, merkleRoot, leaf);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ----------------- owner logic -----------------
|
|
108
|
+
|
|
109
|
+
function setMerkleRoot(bytes32 newMerkleRoot) external payable onlyOwner {
|
|
110
|
+
merkleRoot = newMerkleRoot;
|
|
111
|
+
emit SetMerkleRoot(merkleRoot);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// ----------------- upgrade-related -----------------
|
|
115
|
+
|
|
116
|
+
function _authorizeUpgrade(address) internal override onlyOwner {}
|
|
117
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
2
|
+
pragma solidity ^0.8.0;
|
|
3
|
+
|
|
4
|
+
interface IPMultiTokenMerkleDistributor {
|
|
5
|
+
event Claimed(address indexed token, address indexed user, address indexed receiver, uint256 amount);
|
|
6
|
+
event Verified(address indexed token, address indexed user, uint256 amountClaimable);
|
|
7
|
+
event SetMerkleRoot(bytes32 indexed merkleRoot);
|
|
8
|
+
event SetDefaultTokenList(address[] defaultTokenList);
|
|
9
|
+
|
|
10
|
+
error InvalidMerkleProof();
|
|
11
|
+
|
|
12
|
+
function merkleRoot() external view returns (bytes32);
|
|
13
|
+
|
|
14
|
+
function claimed(address token, address user) external view returns (uint256);
|
|
15
|
+
|
|
16
|
+
function verified(address token, address user) external view returns (uint256);
|
|
17
|
+
|
|
18
|
+
function claim(
|
|
19
|
+
address receiver,
|
|
20
|
+
address[] memory tokens,
|
|
21
|
+
uint256[] memory totalAccrueds,
|
|
22
|
+
bytes32[][] memory proofs
|
|
23
|
+
) external returns (uint256[] memory amountOuts);
|
|
24
|
+
|
|
25
|
+
function claimVerified(address receiver, address[] memory tokens) external returns (uint256[] memory amountOuts);
|
|
26
|
+
|
|
27
|
+
function verify(
|
|
28
|
+
address user,
|
|
29
|
+
address[] memory tokens,
|
|
30
|
+
uint256[] memory totalAccrueds,
|
|
31
|
+
bytes32[][] memory proofs
|
|
32
|
+
) external returns (uint256[] memory amountClaimable);
|
|
33
|
+
}
|
package/deployments/1-core.json
CHANGED
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"gaugeController": "0x47D74516B33eD5D70ddE7119A40839f6Fcc24e57",
|
|
50
50
|
"feeDistributor": "0xd7b34a6fDCb2A7ceD2115FF7f5fdD72aa6aA4dE2",
|
|
51
51
|
"feeDistributorV2": "0x8C237520a8E14D658170A633D96F8e80764433b9",
|
|
52
|
+
"multiTokenDistributor": "0x3942F7B55094250644cFfDa7160226Caa349A38E",
|
|
52
53
|
"sparkLinearDiscountOracleFactory": "0xA9A924A4BB95509F77868E086154C25e934F6171",
|
|
53
54
|
"beta": {
|
|
54
55
|
"PendleChainlinkOracleFactory": "0x2A73e899389cABa2a2f648BaBA35e67f5C00EFee"
|
package/deployments/10-core.json
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"vePendle": "0xd5C47D2383Fddc19596489280C0A33AC42b2bB18",
|
|
47
47
|
"gaugeController": "0x6875e4A945E498FE1B90BbB13CFbAF0b68658C9C",
|
|
48
48
|
"sparkLinearDiscountOracleFactory": "0xA9A924A4BB95509F77868E086154C25e934F6171",
|
|
49
|
+
"multiTokenDistributor": "0x3942F7B55094250644cFfDa7160226Caa349A38E",
|
|
49
50
|
"beta": {
|
|
50
51
|
"PendleChainlinkOracleFactory": "0x2A73e899389cABa2a2f648BaBA35e67f5C00EFee"
|
|
51
52
|
}
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"arbMerkleDistribution": "0x23a102e78D1FF1645a3666691495174764a5FCAF",
|
|
49
49
|
"linearDistributor": "0x83d85AEDD308261d847C3eb8d7146457bD8F38E8",
|
|
50
50
|
"sparkLinearDiscountOracleFactory": "0xA9A924A4BB95509F77868E086154C25e934F6171",
|
|
51
|
+
"multiTokenDistributor": "0x3942F7B55094250644cFfDa7160226Caa349A38E",
|
|
51
52
|
"beta": {
|
|
52
53
|
"PendleChainlinkOracleFactory": "0x2A73e899389cABa2a2f648BaBA35e67f5C00EFee"
|
|
53
54
|
}
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"vePendle": "0x30c6d4e892871220B5Ab66c10db577da96Fb974b",
|
|
45
45
|
"gaugeController": "0x428f2f93afAc3F96B0DE59854038c585e06165C8",
|
|
46
46
|
"sparkLinearDiscountOracleFactory": "0xA9A924A4BB95509F77868E086154C25e934F6171",
|
|
47
|
+
"multiTokenDistributor": "0x3942F7B55094250644cFfDa7160226Caa349A38E",
|
|
47
48
|
"beta": {
|
|
48
49
|
"PendleChainlinkOracleFactory": "0x2A73e899389cABa2a2f648BaBA35e67f5C00EFee"
|
|
49
50
|
}
|
package/deployments/56-core.json
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"vePendle": "0x8A09574b0401A856d89d1b583eE22E8cb0C5530B",
|
|
47
47
|
"gaugeController": "0x704478Dd72FD7F9B83d1F1e0fc18C14B54F034d0",
|
|
48
48
|
"sparkLinearDiscountOracleFactory": "0xA9A924A4BB95509F77868E086154C25e934F6171",
|
|
49
|
+
"multiTokenDistributor": "0x3942F7B55094250644cFfDa7160226Caa349A38E",
|
|
49
50
|
"beta": {
|
|
50
51
|
"PendleChainlinkOracleFactory": "0x2A73e899389cABa2a2f648BaBA35e67f5C00EFee"
|
|
51
52
|
}
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"vePendle": "0x051dcd6a80f11fE68F77Fb0EBdE03853FA96B1fD",
|
|
40
40
|
"gaugeController": "0x17F100fB4bE2707675c6439468d38249DD993d58",
|
|
41
41
|
"sparkLinearDiscountOracleFactory": "0xA9A924A4BB95509F77868E086154C25e934F6171",
|
|
42
|
+
"multiTokenDistributor": "0x3942F7B55094250644cFfDa7160226Caa349A38E",
|
|
42
43
|
"beta": {
|
|
43
44
|
"PendleChainlinkOracleFactory": "0x2A73e899389cABa2a2f648BaBA35e67f5C00EFee"
|
|
44
45
|
}
|