@pendle/core-v2 6.4.2-unichain → 6.4.2
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/StPendle.sol/RoundDataLib.dbg.json +4 -0
- package/build/artifacts/contracts/StPendle.sol/RoundDataLib.json +10 -0
- package/build/artifacts/contracts/StPendle.sol/StPendle.dbg.json +4 -0
- package/build/artifacts/contracts/StPendle.sol/StPendle.json +228 -0
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.dbg.json +1 -1
- package/build/artifacts/contracts/router/Reflector.sol/Reflector.json +2 -2
- package/contracts/StPendle.sol +121 -0
- package/contracts/router/Reflector.sol +19 -2
- package/deployments/1-core.json +1 -1
- package/deployments/10-core.json +1 -1
- package/deployments/130-core.json +2 -1
- package/deployments/130-offchain-helper.json +9 -0
- package/deployments/146-core.json +1 -1
- package/deployments/42161-core.json +1 -1
- package/deployments/5000-core.json +1 -1
- package/deployments/56-core.json +1 -1
- package/deployments/80094-core.json +1 -1
- package/deployments/8453-core.json +1 -1
- package/deployments/9745-core.json +1 -1
- package/deployments/999-core.json +6 -6
- package/package.json +1 -1
- package/typechain-types/StPendle.ts +362 -0
- package/typechain-types/factories/Reflector__factory.ts +1 -1
- package/typechain-types/factories/StPendle__factory.ts +260 -0
- package/typechain-types/hardhat.d.ts +9 -0
- package/typechain-types/index.ts +2 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
|
|
5
|
+
import { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
6
|
+
import type { StPendle, StPendleInterface } from "../StPendle";
|
|
7
|
+
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
internalType: "address",
|
|
13
|
+
name: "user",
|
|
14
|
+
type: "address",
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
name: "balanceOf",
|
|
18
|
+
outputs: [
|
|
19
|
+
{
|
|
20
|
+
internalType: "uint256",
|
|
21
|
+
name: "",
|
|
22
|
+
type: "uint256",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
stateMutability: "view",
|
|
26
|
+
type: "function",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
inputs: [
|
|
30
|
+
{
|
|
31
|
+
internalType: "uint256",
|
|
32
|
+
name: "amount",
|
|
33
|
+
type: "uint256",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
name: "distribute",
|
|
37
|
+
outputs: [],
|
|
38
|
+
stateMutability: "nonpayable",
|
|
39
|
+
type: "function",
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
inputs: [],
|
|
43
|
+
name: "doVote",
|
|
44
|
+
outputs: [],
|
|
45
|
+
stateMutability: "nonpayable",
|
|
46
|
+
type: "function",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
inputs: [
|
|
50
|
+
{
|
|
51
|
+
internalType: "enum State",
|
|
52
|
+
name: "state",
|
|
53
|
+
type: "uint8",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
name: "getSideData",
|
|
57
|
+
outputs: [
|
|
58
|
+
{
|
|
59
|
+
internalType: "uint256",
|
|
60
|
+
name: "sidedPooled",
|
|
61
|
+
type: "uint256",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
internalType: "uint256",
|
|
65
|
+
name: "sidedShares",
|
|
66
|
+
type: "uint256",
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
stateMutability: "view",
|
|
70
|
+
type: "function",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
inputs: [
|
|
74
|
+
{
|
|
75
|
+
internalType: "address",
|
|
76
|
+
name: "user",
|
|
77
|
+
type: "address",
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
name: "getUserData",
|
|
81
|
+
outputs: [
|
|
82
|
+
{
|
|
83
|
+
components: [
|
|
84
|
+
{
|
|
85
|
+
internalType: "enum State",
|
|
86
|
+
name: "state",
|
|
87
|
+
type: "uint8",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
internalType: "uint256",
|
|
91
|
+
name: "metaShares",
|
|
92
|
+
type: "uint256",
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
internalType: "uint256",
|
|
96
|
+
name: "lastVotedRound",
|
|
97
|
+
type: "uint256",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
internalType: "uint256",
|
|
101
|
+
name: "forfeitedUntilRound",
|
|
102
|
+
type: "uint256",
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
internalType: "struct UserData",
|
|
106
|
+
name: "",
|
|
107
|
+
type: "tuple",
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
stateMutability: "view",
|
|
111
|
+
type: "function",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
inputs: [
|
|
115
|
+
{
|
|
116
|
+
internalType: "address",
|
|
117
|
+
name: "user",
|
|
118
|
+
type: "address",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
name: "hasInteractedBefore",
|
|
122
|
+
outputs: [
|
|
123
|
+
{
|
|
124
|
+
internalType: "bool",
|
|
125
|
+
name: "",
|
|
126
|
+
type: "bool",
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
stateMutability: "view",
|
|
130
|
+
type: "function",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
inputs: [
|
|
134
|
+
{
|
|
135
|
+
internalType: "address",
|
|
136
|
+
name: "user",
|
|
137
|
+
type: "address",
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
name: "sharesOf",
|
|
141
|
+
outputs: [
|
|
142
|
+
{
|
|
143
|
+
internalType: "uint256",
|
|
144
|
+
name: "",
|
|
145
|
+
type: "uint256",
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
stateMutability: "view",
|
|
149
|
+
type: "function",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
inputs: [
|
|
153
|
+
{
|
|
154
|
+
internalType: "uint256",
|
|
155
|
+
name: "numShares",
|
|
156
|
+
type: "uint256",
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
name: "sharesValue",
|
|
160
|
+
outputs: [
|
|
161
|
+
{
|
|
162
|
+
internalType: "uint256",
|
|
163
|
+
name: "",
|
|
164
|
+
type: "uint256",
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
stateMutability: "view",
|
|
168
|
+
type: "function",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
inputs: [],
|
|
172
|
+
name: "votingBegin",
|
|
173
|
+
outputs: [],
|
|
174
|
+
stateMutability: "nonpayable",
|
|
175
|
+
type: "function",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
inputs: [],
|
|
179
|
+
name: "votingFinalize",
|
|
180
|
+
outputs: [],
|
|
181
|
+
stateMutability: "nonpayable",
|
|
182
|
+
type: "function",
|
|
183
|
+
},
|
|
184
|
+
];
|
|
185
|
+
|
|
186
|
+
const _bytecode =
|
|
187
|
+
"0x6080604052348015600e575f5ffd5b5061071b8061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061008c575f3560e01c80631e936ff7146100905780633554fd8f1461009257806350e3b1571461009a57806370a08231146100c057806391c05b0b146100d3578063ab0519d6146100e6578063ab38ff2414610123578063dd5117b014610090578063f5eb42dc1461014b578063ffc9896b1461015e575b5f5ffd5b005b61009061017e565b6100ad6100a836600461059f565b610192565b6040519081526020015b60405180910390f35b6100ad6100ce3660046105b6565b6101d6565b6100906100e136600461059f565b6101e9565b6101136100f43660046105b6565b6001600160a01b03165f90815260208190526040902060010154151590565b60405190151581526020016100b7565b6101366101313660046105dc565b61023c565b604080519283526020830191909152016100b7565b6100ad6101593660046105b6565b610438565b61017161016c3660046105b6565b6104d2565b6040516100b7919061060e565b60025f815461018c9061066d565b90915550565b5f5f61019c61056d565b905080600201545f036101b157505f92915050565b600281015460018201546101c59085610685565b6101cf919061069c565b9392505050565b5f6101e36100a883610438565b92915050565b5f6101f261056d565b905081816001015f82825461020791906106bb565b909155505060018101546003820154610220919061069c565b6004820155600380545f906102349061066d565b909155505050565b5f5f5f61024761056d565b90505f84600181111561025c5761025c6105fa565b1461034a576040516306c40bc960e21b81526004810182905273__$d454e8b73aca09d7edc6b19c3e938f0f8b$__90631b102f2490602401602060405180830381865af41580156102af573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102d391906106ce565b60405163582c4dcd60e11b81526004810183905273__$d454e8b73aca09d7edc6b19c3e938f0f8b$__9063b0589b9a90602401602060405180830381865af4158015610321573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034591906106ce565b61042e565b60405163573a2edd60e01b81526004810182905273__$d454e8b73aca09d7edc6b19c3e938f0f8b$__9063573a2edd90602401602060405180830381865af4158015610398573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103bc91906106ce565b6040516345ad4c0360e01b81526004810183905273__$d454e8b73aca09d7edc6b19c3e938f0f8b$__906345ad4c0390602401602060405180830381865af415801561040a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061042e91906106ce565b9250925050915091565b6001600160a01b0381165f90815260208190526040808220815160808101909252805483929190829060ff166001811115610475576104756105fa565b6001811115610486576104866105fa565b8152602001600182015481526020016002820154815260200160038201548152505090505f6104b7825f015161023c565b60208401519092506104ca915082610580565b949350505050565b6104fa6040805160808101909152805f81526020015f81526020015f81526020015f81525090565b6001600160a01b0382165f90815260208190526040908190208151608081019092528054829060ff166001811115610534576105346105fa565b6001811115610545576105456105fa565b8152600182015460208201526002820154604082015260039091015460609091015292915050565b6002545f90815260016020526040902090565b5f8061058c8385610685565b670de0b6b3a76400009004949350505050565b5f602082840312156105af575f5ffd5b5035919050565b5f602082840312156105c6575f5ffd5b81356001600160a01b03811681146101cf575f5ffd5b5f602082840312156105ec575f5ffd5b8135600281106101cf575f5ffd5b634e487b7160e01b5f52602160045260245ffd5b815160808201906002811061063157634e487b7160e01b5f52602160045260245ffd5b8083525060208301516020830152604083015160408301526060830151606083015292915050565b634e487b7160e01b5f52601160045260245ffd5b5f6001820161067e5761067e610659565b5060010190565b80820281158282048414176101e3576101e3610659565b5f826106b657634e487b7160e01b5f52601260045260245ffd5b500490565b808201808211156101e3576101e3610659565b5f602082840312156106de575f5ffd5b505191905056fea26469706673582212200f34f976da4c980dd5ebd41de34b266c630f4938a8bd6cc9e89b2c89621f761564736f6c634300081e0033";
|
|
188
|
+
|
|
189
|
+
type StPendleConstructorParams =
|
|
190
|
+
| [linkLibraryAddresses: StPendleLibraryAddresses, signer?: Signer]
|
|
191
|
+
| ConstructorParameters<typeof ContractFactory>;
|
|
192
|
+
|
|
193
|
+
const isSuperArgs = (
|
|
194
|
+
xs: StPendleConstructorParams
|
|
195
|
+
): xs is ConstructorParameters<typeof ContractFactory> => {
|
|
196
|
+
return (
|
|
197
|
+
typeof xs[0] === "string" ||
|
|
198
|
+
(Array.isArray as (arg: any) => arg is readonly any[])(xs[0]) ||
|
|
199
|
+
"_isInterface" in xs[0]
|
|
200
|
+
);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export class StPendle__factory extends ContractFactory {
|
|
204
|
+
constructor(...args: StPendleConstructorParams) {
|
|
205
|
+
if (isSuperArgs(args)) {
|
|
206
|
+
super(...args);
|
|
207
|
+
} else {
|
|
208
|
+
const [linkLibraryAddresses, signer] = args;
|
|
209
|
+
super(_abi, StPendle__factory.linkBytecode(linkLibraryAddresses), signer);
|
|
210
|
+
}
|
|
211
|
+
this.contractName = "StPendle";
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static linkBytecode(linkLibraryAddresses: StPendleLibraryAddresses): string {
|
|
215
|
+
let linkedBytecode = _bytecode;
|
|
216
|
+
|
|
217
|
+
linkedBytecode = linkedBytecode.replace(
|
|
218
|
+
new RegExp("__\\$d454e8b73aca09d7edc6b19c3e938f0f8b\\$__", "g"),
|
|
219
|
+
linkLibraryAddresses["contracts/StPendle.sol:RoundDataLib"]
|
|
220
|
+
.replace(/^0x/, "")
|
|
221
|
+
.toLowerCase()
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
return linkedBytecode;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
deploy(
|
|
228
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
229
|
+
): Promise<StPendle> {
|
|
230
|
+
return super.deploy(overrides || {}) as Promise<StPendle>;
|
|
231
|
+
}
|
|
232
|
+
getDeployTransaction(
|
|
233
|
+
overrides?: Overrides & { from?: string | Promise<string> }
|
|
234
|
+
): TransactionRequest {
|
|
235
|
+
return super.getDeployTransaction(overrides || {});
|
|
236
|
+
}
|
|
237
|
+
attach(address: string): StPendle {
|
|
238
|
+
return super.attach(address) as StPendle;
|
|
239
|
+
}
|
|
240
|
+
connect(signer: Signer): StPendle__factory {
|
|
241
|
+
return super.connect(signer) as StPendle__factory;
|
|
242
|
+
}
|
|
243
|
+
static readonly contractName: "StPendle";
|
|
244
|
+
public readonly contractName: "StPendle";
|
|
245
|
+
static readonly bytecode = _bytecode;
|
|
246
|
+
static readonly abi = _abi;
|
|
247
|
+
static createInterface(): StPendleInterface {
|
|
248
|
+
return new utils.Interface(_abi) as StPendleInterface;
|
|
249
|
+
}
|
|
250
|
+
static connect(
|
|
251
|
+
address: string,
|
|
252
|
+
signerOrProvider: Signer | Provider
|
|
253
|
+
): StPendle {
|
|
254
|
+
return new Contract(address, _abi, signerOrProvider) as StPendle;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export interface StPendleLibraryAddresses {
|
|
259
|
+
["contracts/StPendle.sol:RoundDataLib"]: string;
|
|
260
|
+
}
|
|
@@ -1068,6 +1068,10 @@ declare module "hardhat/types/runtime" {
|
|
|
1068
1068
|
name: "PendleSwap",
|
|
1069
1069
|
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
1070
1070
|
): Promise<Contracts.PendleSwap__factory>;
|
|
1071
|
+
getContractFactory(
|
|
1072
|
+
name: "StPendle",
|
|
1073
|
+
signerOrOptions?: ethers.Signer | FactoryOptions
|
|
1074
|
+
): Promise<Contracts.StPendle__factory>;
|
|
1071
1075
|
|
|
1072
1076
|
getContractAt(
|
|
1073
1077
|
name: "AggregatorInterface",
|
|
@@ -2389,6 +2393,11 @@ declare module "hardhat/types/runtime" {
|
|
|
2389
2393
|
address: string,
|
|
2390
2394
|
signer?: ethers.Signer
|
|
2391
2395
|
): Promise<Contracts.PendleSwap>;
|
|
2396
|
+
getContractAt(
|
|
2397
|
+
name: "StPendle",
|
|
2398
|
+
address: string,
|
|
2399
|
+
signer?: ethers.Signer
|
|
2400
|
+
): Promise<Contracts.StPendle>;
|
|
2392
2401
|
|
|
2393
2402
|
// default types
|
|
2394
2403
|
getContractFactory(
|
package/typechain-types/index.ts
CHANGED
|
@@ -263,6 +263,7 @@ export type { IAugustusV6 } from "./IAugustusV6";
|
|
|
263
263
|
export type { IKyberScalingHelper } from "./IKyberScalingHelper";
|
|
264
264
|
export type { IOdosRouterV2 } from "./IOdosRouterV2";
|
|
265
265
|
export type { PendleSwap } from "./PendleSwap";
|
|
266
|
+
export type { StPendle } from "./StPendle";
|
|
266
267
|
|
|
267
268
|
export { AggregatorInterface__factory } from "./factories/AggregatorInterface__factory";
|
|
268
269
|
export { AggregatorV2V3Interface__factory } from "./factories/AggregatorV2V3Interface__factory";
|
|
@@ -526,3 +527,4 @@ export { IAugustusV6__factory } from "./factories/IAugustusV6__factory";
|
|
|
526
527
|
export { IKyberScalingHelper__factory } from "./factories/IKyberScalingHelper__factory";
|
|
527
528
|
export { IOdosRouterV2__factory } from "./factories/IOdosRouterV2__factory";
|
|
528
529
|
export { PendleSwap__factory } from "./factories/PendleSwap__factory";
|
|
530
|
+
export { StPendle__factory } from "./factories/StPendle__factory";
|