@pendle/core-v2 0.5.0 → 0.5.1-beta-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/contracts/core/RouterStatic.sol +128 -1
- package/contracts/interfaces/IPRouterStatic.sol +27 -0
- package/package.json +1 -1
- package/typechain-types/ActionStatic.ts +0 -399
- package/typechain-types/IPActionAll.ts +0 -1431
- package/typechain-types/IPActionStatic.ts +0 -359
- package/typechain-types/factories/ActionStatic__factory.ts +0 -308
- package/typechain-types/factories/IPActionAll__factory.ts +0 -983
- package/typechain-types/factories/IPActionStatic__factory.ts +0 -219
|
@@ -84,7 +84,7 @@ contract RouterStatic is IPRouterStatic {
|
|
|
84
84
|
return SCYIndexLib.newIndex(IPMarket(market).SCY());
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
function getOtImpliedYield(address market)
|
|
87
|
+
function getOtImpliedYield(address market) public view returns (int256) {
|
|
88
88
|
MarketState memory state = IPMarket(market).readState(false);
|
|
89
89
|
|
|
90
90
|
int256 lnImpliedRate = (state.lastImpliedRate).Int();
|
|
@@ -104,4 +104,131 @@ contract RouterStatic is IPRouterStatic {
|
|
|
104
104
|
else if (yieldContractFactory.isYT(token)) isYT = true;
|
|
105
105
|
else if (marketFactory.isValidMarket(token)) isMarket = true;
|
|
106
106
|
}
|
|
107
|
+
|
|
108
|
+
function getUserYOInfo(address token, address user)
|
|
109
|
+
public
|
|
110
|
+
view
|
|
111
|
+
returns (UserYOInfo memory userYOInfo)
|
|
112
|
+
{
|
|
113
|
+
(userYOInfo.yt, userYOInfo.ot) = getYO(token);
|
|
114
|
+
IPYieldToken YT = IPYieldToken(userYOInfo.yt);
|
|
115
|
+
userYOInfo.ytBalance = YT.balanceOf(user);
|
|
116
|
+
userYOInfo.otBalance = IPOwnershipToken(userYOInfo.ot).balanceOf(user);
|
|
117
|
+
userYOInfo.unclaimedInterest.token = YT.SCY();
|
|
118
|
+
(, userYOInfo.unclaimedInterest.amount) = YT.getInterestData(user);
|
|
119
|
+
address[] memory rewardTokens = YT.getRewardTokens();
|
|
120
|
+
TokenAmount[] memory unclaimedRewards = new TokenAmount[](rewardTokens.length);
|
|
121
|
+
uint256 length = 0;
|
|
122
|
+
for (uint256 i = 0; i < rewardTokens.length; ++i) {
|
|
123
|
+
address rewardToken = rewardTokens[i];
|
|
124
|
+
(, uint256 amount) = YT.getUserReward(user, rewardToken);
|
|
125
|
+
if (amount > 0) {
|
|
126
|
+
unclaimedRewards[length].token = rewardToken;
|
|
127
|
+
unclaimedRewards[length].amount = amount;
|
|
128
|
+
++length;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
userYOInfo.unclaimedRewards = new TokenAmount[](length);
|
|
132
|
+
for (uint256 i = 0; i < length; ++i) {
|
|
133
|
+
userYOInfo.unclaimedRewards[i] = unclaimedRewards[i];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function getYOInfo(address token)
|
|
138
|
+
external
|
|
139
|
+
returns (
|
|
140
|
+
uint256 exchangeRate,
|
|
141
|
+
uint256 totalSupply,
|
|
142
|
+
RewardIndex[] memory rewardIndexes
|
|
143
|
+
)
|
|
144
|
+
{
|
|
145
|
+
(address yt, ) = getYO(token);
|
|
146
|
+
IPYieldToken YT = IPYieldToken(yt);
|
|
147
|
+
exchangeRate = YT.getScyIndexBeforeExpiry();
|
|
148
|
+
totalSupply = YT.totalSupply();
|
|
149
|
+
address[] memory rewardTokens = YT.getRewardTokens();
|
|
150
|
+
rewardIndexes = new RewardIndex[](rewardTokens.length);
|
|
151
|
+
for (uint256 i = 0; i < rewardTokens.length; ++i) {
|
|
152
|
+
address rewardToken = rewardTokens[i];
|
|
153
|
+
rewardIndexes[i].rewardToken = rewardToken;
|
|
154
|
+
(, rewardIndexes[i].index) = YT.getGlobalReward(rewardToken);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function getYO(address token) public view returns (address ot, address yt) {
|
|
159
|
+
if (yieldContractFactory.isOT(token)) {
|
|
160
|
+
yt = IPOwnershipToken(token).YT();
|
|
161
|
+
ot = token;
|
|
162
|
+
} else if (yieldContractFactory.isYT(token)) {
|
|
163
|
+
yt = token;
|
|
164
|
+
ot = IPYieldToken(token).OT();
|
|
165
|
+
} else if (marketFactory.isValidMarket(token)) {
|
|
166
|
+
yt = IPMarket(token).YT();
|
|
167
|
+
ot = IPMarket(token).OT();
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function getMarketInfo(address market)
|
|
172
|
+
external
|
|
173
|
+
view
|
|
174
|
+
returns (
|
|
175
|
+
address ot,
|
|
176
|
+
address scy,
|
|
177
|
+
MarketState memory state,
|
|
178
|
+
int256 impliedYield,
|
|
179
|
+
uint256 exchangeRate
|
|
180
|
+
)
|
|
181
|
+
{
|
|
182
|
+
IPMarket _market = IPMarket(market);
|
|
183
|
+
ot = _market.OT();
|
|
184
|
+
scy = _market.SCY();
|
|
185
|
+
state = _market.readState(true);
|
|
186
|
+
impliedYield = getOtImpliedYield(market);
|
|
187
|
+
exchangeRate = 0; // TODO: get the actual exchange rate
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function getUserMarketInfo(address market, address user)
|
|
191
|
+
public
|
|
192
|
+
view
|
|
193
|
+
returns (UserMarketInfo memory userMarketInfo)
|
|
194
|
+
{
|
|
195
|
+
IPMarket _market = IPMarket(market);
|
|
196
|
+
userMarketInfo.market = market;
|
|
197
|
+
// TODO: What will this return if the user's balance is staked?
|
|
198
|
+
userMarketInfo.lpBalance = _market.balanceOf(user);
|
|
199
|
+
// TODO: Is there a way to convert LP to OT and SCY?
|
|
200
|
+
userMarketInfo.otBalance = TokenAmount(_market.OT(), 0);
|
|
201
|
+
userMarketInfo.scyBalance = TokenAmount(_market.SCY(), 0);
|
|
202
|
+
// TODO: Get this from SCY once it is in the interface
|
|
203
|
+
userMarketInfo.assetBalance = TokenAmount(address(0), 0);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function getUserYOPositionsByTokens(address user, address[] calldata tokens)
|
|
207
|
+
external
|
|
208
|
+
view
|
|
209
|
+
returns (UserYOInfo[] memory userYOPositions)
|
|
210
|
+
{
|
|
211
|
+
userYOPositions = new UserYOInfo[](tokens.length);
|
|
212
|
+
for (uint256 i = 0; i < tokens.length; ++i) {
|
|
213
|
+
userYOPositions[i] = getUserYOInfo(tokens[i], user);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function getUserMarketPositions(address user, address[] calldata markets)
|
|
218
|
+
external
|
|
219
|
+
view
|
|
220
|
+
returns (UserMarketInfo[] memory userMarketPositions)
|
|
221
|
+
{
|
|
222
|
+
userMarketPositions = new UserMarketInfo[](markets.length);
|
|
223
|
+
for (uint256 i = 0; i < markets.length; ++i) {
|
|
224
|
+
userMarketPositions[i] = getUserMarketInfo(markets[i], user);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function hasYOPosition(UserYOInfo memory userYOInfo) public pure returns (bool hasPosition) {
|
|
229
|
+
hasPosition = (userYOInfo.ytBalance > 0 ||
|
|
230
|
+
userYOInfo.otBalance > 0 ||
|
|
231
|
+
userYOInfo.unclaimedInterest.amount > 0 ||
|
|
232
|
+
userYOInfo.unclaimedRewards.length > 0);
|
|
233
|
+
}
|
|
107
234
|
}
|
|
@@ -4,6 +4,33 @@ pragma solidity 0.8.9;
|
|
|
4
4
|
import "../libraries/math/MarketMathCore.sol";
|
|
5
5
|
|
|
6
6
|
interface IPRouterStatic {
|
|
7
|
+
struct TokenAmount {
|
|
8
|
+
address token;
|
|
9
|
+
uint256 amount;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
struct RewardIndex {
|
|
13
|
+
address rewardToken;
|
|
14
|
+
uint256 index;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
struct UserYOInfo {
|
|
18
|
+
address yt;
|
|
19
|
+
address ot;
|
|
20
|
+
uint256 ytBalance;
|
|
21
|
+
uint256 otBalance;
|
|
22
|
+
TokenAmount unclaimedInterest;
|
|
23
|
+
TokenAmount[] unclaimedRewards;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
struct UserMarketInfo {
|
|
27
|
+
address market;
|
|
28
|
+
uint256 lpBalance;
|
|
29
|
+
TokenAmount otBalance;
|
|
30
|
+
TokenAmount scyBalance;
|
|
31
|
+
TokenAmount assetBalance;
|
|
32
|
+
}
|
|
33
|
+
|
|
7
34
|
function addLiquidityStatic(
|
|
8
35
|
address market,
|
|
9
36
|
uint256 scyDesired,
|
package/package.json
CHANGED
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
/* Autogenerated file. Do not edit manually. */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
import {
|
|
5
|
-
BaseContract,
|
|
6
|
-
BigNumber,
|
|
7
|
-
BigNumberish,
|
|
8
|
-
BytesLike,
|
|
9
|
-
CallOverrides,
|
|
10
|
-
ContractTransaction,
|
|
11
|
-
Overrides,
|
|
12
|
-
PopulatedTransaction,
|
|
13
|
-
Signer,
|
|
14
|
-
utils,
|
|
15
|
-
} from "ethers";
|
|
16
|
-
import { FunctionFragment, Result } from "@ethersproject/abi";
|
|
17
|
-
import { Listener, Provider } from "@ethersproject/providers";
|
|
18
|
-
import type {
|
|
19
|
-
TypedEventFilter,
|
|
20
|
-
TypedEvent,
|
|
21
|
-
TypedListener,
|
|
22
|
-
OnEvent,
|
|
23
|
-
} from "./common";
|
|
24
|
-
|
|
25
|
-
export interface ActionStaticInterface extends utils.Interface {
|
|
26
|
-
contractName: "ActionStatic";
|
|
27
|
-
functions: {
|
|
28
|
-
"addLiquidityStatic(address,uint256,uint256)": FunctionFragment;
|
|
29
|
-
"getOtImpliedYield(address)": FunctionFragment;
|
|
30
|
-
"getPendleTokenType(address)": FunctionFragment;
|
|
31
|
-
"marketFactory()": FunctionFragment;
|
|
32
|
-
"removeLiquidityStatic(address,uint256)": FunctionFragment;
|
|
33
|
-
"scyIndex(address)": FunctionFragment;
|
|
34
|
-
"swapOtForScyStatic(address,uint256)": FunctionFragment;
|
|
35
|
-
"swapScyForOtStatic(address,uint256)": FunctionFragment;
|
|
36
|
-
"yieldContractFactory()": FunctionFragment;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
encodeFunctionData(
|
|
40
|
-
functionFragment: "addLiquidityStatic",
|
|
41
|
-
values: [string, BigNumberish, BigNumberish]
|
|
42
|
-
): string;
|
|
43
|
-
encodeFunctionData(
|
|
44
|
-
functionFragment: "getOtImpliedYield",
|
|
45
|
-
values: [string]
|
|
46
|
-
): string;
|
|
47
|
-
encodeFunctionData(
|
|
48
|
-
functionFragment: "getPendleTokenType",
|
|
49
|
-
values: [string]
|
|
50
|
-
): string;
|
|
51
|
-
encodeFunctionData(
|
|
52
|
-
functionFragment: "marketFactory",
|
|
53
|
-
values?: undefined
|
|
54
|
-
): string;
|
|
55
|
-
encodeFunctionData(
|
|
56
|
-
functionFragment: "removeLiquidityStatic",
|
|
57
|
-
values: [string, BigNumberish]
|
|
58
|
-
): string;
|
|
59
|
-
encodeFunctionData(functionFragment: "scyIndex", values: [string]): string;
|
|
60
|
-
encodeFunctionData(
|
|
61
|
-
functionFragment: "swapOtForScyStatic",
|
|
62
|
-
values: [string, BigNumberish]
|
|
63
|
-
): string;
|
|
64
|
-
encodeFunctionData(
|
|
65
|
-
functionFragment: "swapScyForOtStatic",
|
|
66
|
-
values: [string, BigNumberish]
|
|
67
|
-
): string;
|
|
68
|
-
encodeFunctionData(
|
|
69
|
-
functionFragment: "yieldContractFactory",
|
|
70
|
-
values?: undefined
|
|
71
|
-
): string;
|
|
72
|
-
|
|
73
|
-
decodeFunctionResult(
|
|
74
|
-
functionFragment: "addLiquidityStatic",
|
|
75
|
-
data: BytesLike
|
|
76
|
-
): Result;
|
|
77
|
-
decodeFunctionResult(
|
|
78
|
-
functionFragment: "getOtImpliedYield",
|
|
79
|
-
data: BytesLike
|
|
80
|
-
): Result;
|
|
81
|
-
decodeFunctionResult(
|
|
82
|
-
functionFragment: "getPendleTokenType",
|
|
83
|
-
data: BytesLike
|
|
84
|
-
): Result;
|
|
85
|
-
decodeFunctionResult(
|
|
86
|
-
functionFragment: "marketFactory",
|
|
87
|
-
data: BytesLike
|
|
88
|
-
): Result;
|
|
89
|
-
decodeFunctionResult(
|
|
90
|
-
functionFragment: "removeLiquidityStatic",
|
|
91
|
-
data: BytesLike
|
|
92
|
-
): Result;
|
|
93
|
-
decodeFunctionResult(functionFragment: "scyIndex", data: BytesLike): Result;
|
|
94
|
-
decodeFunctionResult(
|
|
95
|
-
functionFragment: "swapOtForScyStatic",
|
|
96
|
-
data: BytesLike
|
|
97
|
-
): Result;
|
|
98
|
-
decodeFunctionResult(
|
|
99
|
-
functionFragment: "swapScyForOtStatic",
|
|
100
|
-
data: BytesLike
|
|
101
|
-
): Result;
|
|
102
|
-
decodeFunctionResult(
|
|
103
|
-
functionFragment: "yieldContractFactory",
|
|
104
|
-
data: BytesLike
|
|
105
|
-
): Result;
|
|
106
|
-
|
|
107
|
-
events: {};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export interface ActionStatic extends BaseContract {
|
|
111
|
-
contractName: "ActionStatic";
|
|
112
|
-
connect(signerOrProvider: Signer | Provider | string): this;
|
|
113
|
-
attach(addressOrName: string): this;
|
|
114
|
-
deployed(): Promise<this>;
|
|
115
|
-
|
|
116
|
-
interface: ActionStaticInterface;
|
|
117
|
-
|
|
118
|
-
queryFilter<TEvent extends TypedEvent>(
|
|
119
|
-
event: TypedEventFilter<TEvent>,
|
|
120
|
-
fromBlockOrBlockhash?: string | number | undefined,
|
|
121
|
-
toBlock?: string | number | undefined
|
|
122
|
-
): Promise<Array<TEvent>>;
|
|
123
|
-
|
|
124
|
-
listeners<TEvent extends TypedEvent>(
|
|
125
|
-
eventFilter?: TypedEventFilter<TEvent>
|
|
126
|
-
): Array<TypedListener<TEvent>>;
|
|
127
|
-
listeners(eventName?: string): Array<Listener>;
|
|
128
|
-
removeAllListeners<TEvent extends TypedEvent>(
|
|
129
|
-
eventFilter: TypedEventFilter<TEvent>
|
|
130
|
-
): this;
|
|
131
|
-
removeAllListeners(eventName?: string): this;
|
|
132
|
-
off: OnEvent<this>;
|
|
133
|
-
on: OnEvent<this>;
|
|
134
|
-
once: OnEvent<this>;
|
|
135
|
-
removeListener: OnEvent<this>;
|
|
136
|
-
|
|
137
|
-
functions: {
|
|
138
|
-
addLiquidityStatic(
|
|
139
|
-
market: string,
|
|
140
|
-
scyDesired: BigNumberish,
|
|
141
|
-
otDesired: BigNumberish,
|
|
142
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
143
|
-
): Promise<ContractTransaction>;
|
|
144
|
-
|
|
145
|
-
getOtImpliedYield(
|
|
146
|
-
market: string,
|
|
147
|
-
overrides?: CallOverrides
|
|
148
|
-
): Promise<[BigNumber]>;
|
|
149
|
-
|
|
150
|
-
getPendleTokenType(
|
|
151
|
-
token: string,
|
|
152
|
-
overrides?: CallOverrides
|
|
153
|
-
): Promise<
|
|
154
|
-
[boolean, boolean, boolean] & {
|
|
155
|
-
isOT: boolean;
|
|
156
|
-
isYT: boolean;
|
|
157
|
-
isMarket: boolean;
|
|
158
|
-
}
|
|
159
|
-
>;
|
|
160
|
-
|
|
161
|
-
marketFactory(overrides?: CallOverrides): Promise<[string]>;
|
|
162
|
-
|
|
163
|
-
removeLiquidityStatic(
|
|
164
|
-
market: string,
|
|
165
|
-
lpToRemove: BigNumberish,
|
|
166
|
-
overrides?: CallOverrides
|
|
167
|
-
): Promise<
|
|
168
|
-
[BigNumber, BigNumber] & { netScyOut: BigNumber; netOtOut: BigNumber }
|
|
169
|
-
>;
|
|
170
|
-
|
|
171
|
-
scyIndex(
|
|
172
|
-
market: string,
|
|
173
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
174
|
-
): Promise<ContractTransaction>;
|
|
175
|
-
|
|
176
|
-
swapOtForScyStatic(
|
|
177
|
-
market: string,
|
|
178
|
-
exactOtIn: BigNumberish,
|
|
179
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
180
|
-
): Promise<ContractTransaction>;
|
|
181
|
-
|
|
182
|
-
swapScyForOtStatic(
|
|
183
|
-
market: string,
|
|
184
|
-
exactOtOut: BigNumberish,
|
|
185
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
186
|
-
): Promise<ContractTransaction>;
|
|
187
|
-
|
|
188
|
-
yieldContractFactory(overrides?: CallOverrides): Promise<[string]>;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
addLiquidityStatic(
|
|
192
|
-
market: string,
|
|
193
|
-
scyDesired: BigNumberish,
|
|
194
|
-
otDesired: BigNumberish,
|
|
195
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
196
|
-
): Promise<ContractTransaction>;
|
|
197
|
-
|
|
198
|
-
getOtImpliedYield(
|
|
199
|
-
market: string,
|
|
200
|
-
overrides?: CallOverrides
|
|
201
|
-
): Promise<BigNumber>;
|
|
202
|
-
|
|
203
|
-
getPendleTokenType(
|
|
204
|
-
token: string,
|
|
205
|
-
overrides?: CallOverrides
|
|
206
|
-
): Promise<
|
|
207
|
-
[boolean, boolean, boolean] & {
|
|
208
|
-
isOT: boolean;
|
|
209
|
-
isYT: boolean;
|
|
210
|
-
isMarket: boolean;
|
|
211
|
-
}
|
|
212
|
-
>;
|
|
213
|
-
|
|
214
|
-
marketFactory(overrides?: CallOverrides): Promise<string>;
|
|
215
|
-
|
|
216
|
-
removeLiquidityStatic(
|
|
217
|
-
market: string,
|
|
218
|
-
lpToRemove: BigNumberish,
|
|
219
|
-
overrides?: CallOverrides
|
|
220
|
-
): Promise<
|
|
221
|
-
[BigNumber, BigNumber] & { netScyOut: BigNumber; netOtOut: BigNumber }
|
|
222
|
-
>;
|
|
223
|
-
|
|
224
|
-
scyIndex(
|
|
225
|
-
market: string,
|
|
226
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
227
|
-
): Promise<ContractTransaction>;
|
|
228
|
-
|
|
229
|
-
swapOtForScyStatic(
|
|
230
|
-
market: string,
|
|
231
|
-
exactOtIn: BigNumberish,
|
|
232
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
233
|
-
): Promise<ContractTransaction>;
|
|
234
|
-
|
|
235
|
-
swapScyForOtStatic(
|
|
236
|
-
market: string,
|
|
237
|
-
exactOtOut: BigNumberish,
|
|
238
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
239
|
-
): Promise<ContractTransaction>;
|
|
240
|
-
|
|
241
|
-
yieldContractFactory(overrides?: CallOverrides): Promise<string>;
|
|
242
|
-
|
|
243
|
-
callStatic: {
|
|
244
|
-
addLiquidityStatic(
|
|
245
|
-
market: string,
|
|
246
|
-
scyDesired: BigNumberish,
|
|
247
|
-
otDesired: BigNumberish,
|
|
248
|
-
overrides?: CallOverrides
|
|
249
|
-
): Promise<
|
|
250
|
-
[BigNumber, BigNumber, BigNumber] & {
|
|
251
|
-
netLpOut: BigNumber;
|
|
252
|
-
scyUsed: BigNumber;
|
|
253
|
-
otUsed: BigNumber;
|
|
254
|
-
}
|
|
255
|
-
>;
|
|
256
|
-
|
|
257
|
-
getOtImpliedYield(
|
|
258
|
-
market: string,
|
|
259
|
-
overrides?: CallOverrides
|
|
260
|
-
): Promise<BigNumber>;
|
|
261
|
-
|
|
262
|
-
getPendleTokenType(
|
|
263
|
-
token: string,
|
|
264
|
-
overrides?: CallOverrides
|
|
265
|
-
): Promise<
|
|
266
|
-
[boolean, boolean, boolean] & {
|
|
267
|
-
isOT: boolean;
|
|
268
|
-
isYT: boolean;
|
|
269
|
-
isMarket: boolean;
|
|
270
|
-
}
|
|
271
|
-
>;
|
|
272
|
-
|
|
273
|
-
marketFactory(overrides?: CallOverrides): Promise<string>;
|
|
274
|
-
|
|
275
|
-
removeLiquidityStatic(
|
|
276
|
-
market: string,
|
|
277
|
-
lpToRemove: BigNumberish,
|
|
278
|
-
overrides?: CallOverrides
|
|
279
|
-
): Promise<
|
|
280
|
-
[BigNumber, BigNumber] & { netScyOut: BigNumber; netOtOut: BigNumber }
|
|
281
|
-
>;
|
|
282
|
-
|
|
283
|
-
scyIndex(market: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
284
|
-
|
|
285
|
-
swapOtForScyStatic(
|
|
286
|
-
market: string,
|
|
287
|
-
exactOtIn: BigNumberish,
|
|
288
|
-
overrides?: CallOverrides
|
|
289
|
-
): Promise<
|
|
290
|
-
[BigNumber, BigNumber] & { netScyOut: BigNumber; netScyFee: BigNumber }
|
|
291
|
-
>;
|
|
292
|
-
|
|
293
|
-
swapScyForOtStatic(
|
|
294
|
-
market: string,
|
|
295
|
-
exactOtOut: BigNumberish,
|
|
296
|
-
overrides?: CallOverrides
|
|
297
|
-
): Promise<
|
|
298
|
-
[BigNumber, BigNumber] & { netScyIn: BigNumber; netScyFee: BigNumber }
|
|
299
|
-
>;
|
|
300
|
-
|
|
301
|
-
yieldContractFactory(overrides?: CallOverrides): Promise<string>;
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
filters: {};
|
|
305
|
-
|
|
306
|
-
estimateGas: {
|
|
307
|
-
addLiquidityStatic(
|
|
308
|
-
market: string,
|
|
309
|
-
scyDesired: BigNumberish,
|
|
310
|
-
otDesired: BigNumberish,
|
|
311
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
312
|
-
): Promise<BigNumber>;
|
|
313
|
-
|
|
314
|
-
getOtImpliedYield(
|
|
315
|
-
market: string,
|
|
316
|
-
overrides?: CallOverrides
|
|
317
|
-
): Promise<BigNumber>;
|
|
318
|
-
|
|
319
|
-
getPendleTokenType(
|
|
320
|
-
token: string,
|
|
321
|
-
overrides?: CallOverrides
|
|
322
|
-
): Promise<BigNumber>;
|
|
323
|
-
|
|
324
|
-
marketFactory(overrides?: CallOverrides): Promise<BigNumber>;
|
|
325
|
-
|
|
326
|
-
removeLiquidityStatic(
|
|
327
|
-
market: string,
|
|
328
|
-
lpToRemove: BigNumberish,
|
|
329
|
-
overrides?: CallOverrides
|
|
330
|
-
): Promise<BigNumber>;
|
|
331
|
-
|
|
332
|
-
scyIndex(
|
|
333
|
-
market: string,
|
|
334
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
335
|
-
): Promise<BigNumber>;
|
|
336
|
-
|
|
337
|
-
swapOtForScyStatic(
|
|
338
|
-
market: string,
|
|
339
|
-
exactOtIn: BigNumberish,
|
|
340
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
341
|
-
): Promise<BigNumber>;
|
|
342
|
-
|
|
343
|
-
swapScyForOtStatic(
|
|
344
|
-
market: string,
|
|
345
|
-
exactOtOut: BigNumberish,
|
|
346
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
347
|
-
): Promise<BigNumber>;
|
|
348
|
-
|
|
349
|
-
yieldContractFactory(overrides?: CallOverrides): Promise<BigNumber>;
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
populateTransaction: {
|
|
353
|
-
addLiquidityStatic(
|
|
354
|
-
market: string,
|
|
355
|
-
scyDesired: BigNumberish,
|
|
356
|
-
otDesired: BigNumberish,
|
|
357
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
358
|
-
): Promise<PopulatedTransaction>;
|
|
359
|
-
|
|
360
|
-
getOtImpliedYield(
|
|
361
|
-
market: string,
|
|
362
|
-
overrides?: CallOverrides
|
|
363
|
-
): Promise<PopulatedTransaction>;
|
|
364
|
-
|
|
365
|
-
getPendleTokenType(
|
|
366
|
-
token: string,
|
|
367
|
-
overrides?: CallOverrides
|
|
368
|
-
): Promise<PopulatedTransaction>;
|
|
369
|
-
|
|
370
|
-
marketFactory(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
371
|
-
|
|
372
|
-
removeLiquidityStatic(
|
|
373
|
-
market: string,
|
|
374
|
-
lpToRemove: BigNumberish,
|
|
375
|
-
overrides?: CallOverrides
|
|
376
|
-
): Promise<PopulatedTransaction>;
|
|
377
|
-
|
|
378
|
-
scyIndex(
|
|
379
|
-
market: string,
|
|
380
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
381
|
-
): Promise<PopulatedTransaction>;
|
|
382
|
-
|
|
383
|
-
swapOtForScyStatic(
|
|
384
|
-
market: string,
|
|
385
|
-
exactOtIn: BigNumberish,
|
|
386
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
387
|
-
): Promise<PopulatedTransaction>;
|
|
388
|
-
|
|
389
|
-
swapScyForOtStatic(
|
|
390
|
-
market: string,
|
|
391
|
-
exactOtOut: BigNumberish,
|
|
392
|
-
overrides?: Overrides & { from?: string | Promise<string> }
|
|
393
|
-
): Promise<PopulatedTransaction>;
|
|
394
|
-
|
|
395
|
-
yieldContractFactory(
|
|
396
|
-
overrides?: CallOverrides
|
|
397
|
-
): Promise<PopulatedTransaction>;
|
|
398
|
-
};
|
|
399
|
-
}
|