@gearbox-protocol/sdk 3.0.0-next.61 → 3.0.0-next.63
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/index.sol +1 -0
- package/lib/core/creditManager.js +0 -10
- package/lib/parsers/creditFacadeParser.js +15 -0
- package/lib/parsers/creditFacadeParser.spec.js +2 -2
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeed.d.ts +285 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeed.js +2 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedEvents.d.ts +54 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedEvents.js +2 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedExceptions.d.ts +27 -0
- package/lib/types/ILPPriceFeed.sol/ILPPriceFeedExceptions.js +2 -0
- package/lib/types/ILPPriceFeed.sol/index.d.ts +3 -0
- package/lib/types/ILPPriceFeed.sol/index.js +2 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedEvents__factory.d.ts +33 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedEvents__factory.js +51 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedExceptions__factory.d.ts +24 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeedExceptions__factory.js +39 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeed__factory.d.ts +257 -0
- package/lib/types/factories/ILPPriceFeed.sol/ILPPriceFeed__factory.js +339 -0
- package/lib/types/factories/ILPPriceFeed.sol/index.d.ts +3 -0
- package/lib/types/factories/ILPPriceFeed.sol/index.js +12 -0
- package/lib/types/factories/index.d.ts +1 -0
- package/lib/types/factories/index.js +3 -2
- package/lib/types/index.d.ts +8 -0
- package/lib/types/index.js +8 -2
- package/package.json +1 -1
package/contracts/index.sol
CHANGED
|
@@ -56,6 +56,7 @@ import {IPriceOracleBase} from "@gearbox-protocol/core-v2/contracts/interfaces/I
|
|
|
56
56
|
import {IPriceOracleV2} from "@gearbox-protocol/core-v2/contracts/interfaces/IPriceOracle.sol";
|
|
57
57
|
import {IPriceOracleV3} from "@gearbox-protocol/core-v3/contracts/interfaces/IPriceOracleV3.sol";
|
|
58
58
|
import {IPriceFeed} from "@gearbox-protocol/core-v2/contracts/interfaces/IPriceFeed.sol";
|
|
59
|
+
import {ILPPriceFeed} from "@gearbox-protocol/oracles-v3/contracts/interfaces/ILPPriceFeed.sol";
|
|
59
60
|
|
|
60
61
|
import {ICurveV1_2AssetsAdapter} from
|
|
61
62
|
"@gearbox-protocol/integrations-v3/contracts/interfaces/curve/ICurveV1_2AssetsAdapter.sol";
|
|
@@ -188,16 +188,6 @@ class CreditManagerData {
|
|
|
188
188
|
callData: types_1.ICreditFacadeV2Extended__factory.createInterface().encodeFunctionData("revertIfReceivedLessThan", [assets]),
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
// encodeRevertIfReceivedLessThanV3(assets: Array<Asset>): MultiCall {
|
|
192
|
-
// return {
|
|
193
|
-
// target: this.creditFacade,
|
|
194
|
-
// callData:
|
|
195
|
-
// ICreditFacadeV3Multicall__factory.createInterface().encodeFunctionData(
|
|
196
|
-
// "revertIfReceivedLessThan",
|
|
197
|
-
// [assets.map(a => ({ token: a.token, amount: a.balance }))],
|
|
198
|
-
// ),
|
|
199
|
-
// };
|
|
200
|
-
// }
|
|
201
191
|
encodeUpdateQuotaV3(token, quotaChange, minQuota) {
|
|
202
192
|
return {
|
|
203
193
|
target: this.creditFacade,
|
|
@@ -56,6 +56,21 @@ class CreditFacadeParser extends abstractParser_1.AbstractParser {
|
|
|
56
56
|
const [tokenAddress, amount, deadline, v, r, s] = this.decodeFunctionData(functionFragment, calldata);
|
|
57
57
|
return `${functionName}(token: ${this.tokenSymbol(tokenAddress)}, amount: ${this.formatBN(amount, this.tokenSymbol(tokenAddress))}, ${[deadline, v, r, s].join(", ")})`;
|
|
58
58
|
}
|
|
59
|
+
case "compareBalances": {
|
|
60
|
+
return `${functionName}()`;
|
|
61
|
+
}
|
|
62
|
+
case "setFullCheckParams": {
|
|
63
|
+
const [collateralHints, minHealthFactor] = this.decodeFunctionData(functionFragment, calldata);
|
|
64
|
+
return `${functionName}(token: ${collateralHints
|
|
65
|
+
.map((a) => this.formatAmount(a))
|
|
66
|
+
.join(", ")}, minHealthFactor: ${minHealthFactor})`;
|
|
67
|
+
}
|
|
68
|
+
case "storeExpectedBalances": {
|
|
69
|
+
const [balanceDeltas] = this.decodeFunctionData(functionFragment, calldata);
|
|
70
|
+
return `${functionName}(balanceDeltas: ${balanceDeltas
|
|
71
|
+
.map((b) => `${this.tokenSymbol(b.token)}: ${this.formatBN(b.amount, this.tokenSymbol(b.token))}`)
|
|
72
|
+
.join(", ")})`;
|
|
73
|
+
}
|
|
59
74
|
default:
|
|
60
75
|
return `${functionName}: Unknown operation ${functionFragment.name} with calldata ${calldata}`;
|
|
61
76
|
}
|
|
@@ -10,9 +10,9 @@ describe("CreditFacadeParser test", () => {
|
|
|
10
10
|
const ifc = types_1.ICreditFacadeV2Extended__factory.createInterface();
|
|
11
11
|
let parsed = parser.parse(ifc.encodeFunctionData("addCollateral", [
|
|
12
12
|
sdk_gov_1.tokenDataByNetwork.Mainnet.WBTC,
|
|
13
|
-
(sdk_gov_1.
|
|
13
|
+
(10n ** (0, sdk_gov_1.toBigInt)(sdk_gov_1.decimals.WBTC) * 444n) / 10n,
|
|
14
14
|
]));
|
|
15
|
-
(0, chai_1.expect)(parsed).to.be.eq("CreditFacade[DAI].addCollateral(token: WBTC, amount: 44.40 [
|
|
15
|
+
(0, chai_1.expect)(parsed).to.be.eq("CreditFacade[DAI].addCollateral(token: WBTC, amount: 44.40 [4440000000])", "Incorrect parse addCollateral");
|
|
16
16
|
parsed = parser.parse(ifc.encodeFunctionData("increaseDebt", [(sdk_gov_1.WAD * 414n) / 10n]));
|
|
17
17
|
(0, chai_1.expect)(parsed).to.be.eq("CreditFacade[DAI].increaseDebt(amount: 41.40 [41400000000000000000])", "Incorrect parse increaseDebt");
|
|
18
18
|
parsed = parser.parse(ifc.encodeFunctionData("decreaseDebt", [(sdk_gov_1.WAD * 334n) / 10n]));
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent, PromiseOrValue } from "../common";
|
|
5
|
+
export interface ILPPriceFeedInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"allowBoundsUpdate()": FunctionFragment;
|
|
8
|
+
"decimals()": FunctionFragment;
|
|
9
|
+
"description()": FunctionFragment;
|
|
10
|
+
"forbidBoundsUpdate()": FunctionFragment;
|
|
11
|
+
"getAggregatePrice()": FunctionFragment;
|
|
12
|
+
"getLPExchangeRate()": FunctionFragment;
|
|
13
|
+
"getScale()": FunctionFragment;
|
|
14
|
+
"lastBoundsUpdate()": FunctionFragment;
|
|
15
|
+
"latestRoundData()": FunctionFragment;
|
|
16
|
+
"lowerBound()": FunctionFragment;
|
|
17
|
+
"lpContract()": FunctionFragment;
|
|
18
|
+
"lpToken()": FunctionFragment;
|
|
19
|
+
"priceFeedType()": FunctionFragment;
|
|
20
|
+
"priceOracle()": FunctionFragment;
|
|
21
|
+
"setLimiter(uint256)": FunctionFragment;
|
|
22
|
+
"skipPriceCheck()": FunctionFragment;
|
|
23
|
+
"updateBounds(bytes)": FunctionFragment;
|
|
24
|
+
"updateBoundsAllowed()": FunctionFragment;
|
|
25
|
+
"upperBound()": FunctionFragment;
|
|
26
|
+
"version()": FunctionFragment;
|
|
27
|
+
};
|
|
28
|
+
getFunction(nameOrSignatureOrTopic: "allowBoundsUpdate" | "decimals" | "description" | "forbidBoundsUpdate" | "getAggregatePrice" | "getLPExchangeRate" | "getScale" | "lastBoundsUpdate" | "latestRoundData" | "lowerBound" | "lpContract" | "lpToken" | "priceFeedType" | "priceOracle" | "setLimiter" | "skipPriceCheck" | "updateBounds" | "updateBoundsAllowed" | "upperBound" | "version"): FunctionFragment;
|
|
29
|
+
encodeFunctionData(functionFragment: "allowBoundsUpdate", values?: undefined): string;
|
|
30
|
+
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
|
|
31
|
+
encodeFunctionData(functionFragment: "description", values?: undefined): string;
|
|
32
|
+
encodeFunctionData(functionFragment: "forbidBoundsUpdate", values?: undefined): string;
|
|
33
|
+
encodeFunctionData(functionFragment: "getAggregatePrice", values?: undefined): string;
|
|
34
|
+
encodeFunctionData(functionFragment: "getLPExchangeRate", values?: undefined): string;
|
|
35
|
+
encodeFunctionData(functionFragment: "getScale", values?: undefined): string;
|
|
36
|
+
encodeFunctionData(functionFragment: "lastBoundsUpdate", values?: undefined): string;
|
|
37
|
+
encodeFunctionData(functionFragment: "latestRoundData", values?: undefined): string;
|
|
38
|
+
encodeFunctionData(functionFragment: "lowerBound", values?: undefined): string;
|
|
39
|
+
encodeFunctionData(functionFragment: "lpContract", values?: undefined): string;
|
|
40
|
+
encodeFunctionData(functionFragment: "lpToken", values?: undefined): string;
|
|
41
|
+
encodeFunctionData(functionFragment: "priceFeedType", values?: undefined): string;
|
|
42
|
+
encodeFunctionData(functionFragment: "priceOracle", values?: undefined): string;
|
|
43
|
+
encodeFunctionData(functionFragment: "setLimiter", values: [PromiseOrValue<BigNumberish>]): string;
|
|
44
|
+
encodeFunctionData(functionFragment: "skipPriceCheck", values?: undefined): string;
|
|
45
|
+
encodeFunctionData(functionFragment: "updateBounds", values: [PromiseOrValue<BytesLike>]): string;
|
|
46
|
+
encodeFunctionData(functionFragment: "updateBoundsAllowed", values?: undefined): string;
|
|
47
|
+
encodeFunctionData(functionFragment: "upperBound", values?: undefined): string;
|
|
48
|
+
encodeFunctionData(functionFragment: "version", values?: undefined): string;
|
|
49
|
+
decodeFunctionResult(functionFragment: "allowBoundsUpdate", data: BytesLike): Result;
|
|
50
|
+
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
|
|
51
|
+
decodeFunctionResult(functionFragment: "description", data: BytesLike): Result;
|
|
52
|
+
decodeFunctionResult(functionFragment: "forbidBoundsUpdate", data: BytesLike): Result;
|
|
53
|
+
decodeFunctionResult(functionFragment: "getAggregatePrice", data: BytesLike): Result;
|
|
54
|
+
decodeFunctionResult(functionFragment: "getLPExchangeRate", data: BytesLike): Result;
|
|
55
|
+
decodeFunctionResult(functionFragment: "getScale", data: BytesLike): Result;
|
|
56
|
+
decodeFunctionResult(functionFragment: "lastBoundsUpdate", data: BytesLike): Result;
|
|
57
|
+
decodeFunctionResult(functionFragment: "latestRoundData", data: BytesLike): Result;
|
|
58
|
+
decodeFunctionResult(functionFragment: "lowerBound", data: BytesLike): Result;
|
|
59
|
+
decodeFunctionResult(functionFragment: "lpContract", data: BytesLike): Result;
|
|
60
|
+
decodeFunctionResult(functionFragment: "lpToken", data: BytesLike): Result;
|
|
61
|
+
decodeFunctionResult(functionFragment: "priceFeedType", data: BytesLike): Result;
|
|
62
|
+
decodeFunctionResult(functionFragment: "priceOracle", data: BytesLike): Result;
|
|
63
|
+
decodeFunctionResult(functionFragment: "setLimiter", data: BytesLike): Result;
|
|
64
|
+
decodeFunctionResult(functionFragment: "skipPriceCheck", data: BytesLike): Result;
|
|
65
|
+
decodeFunctionResult(functionFragment: "updateBounds", data: BytesLike): Result;
|
|
66
|
+
decodeFunctionResult(functionFragment: "updateBoundsAllowed", data: BytesLike): Result;
|
|
67
|
+
decodeFunctionResult(functionFragment: "upperBound", data: BytesLike): Result;
|
|
68
|
+
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
|
|
69
|
+
events: {
|
|
70
|
+
"SetBounds(uint256,uint256)": EventFragment;
|
|
71
|
+
"SetUpdateBoundsAllowed(bool)": EventFragment;
|
|
72
|
+
};
|
|
73
|
+
getEvent(nameOrSignatureOrTopic: "SetBounds"): EventFragment;
|
|
74
|
+
getEvent(nameOrSignatureOrTopic: "SetUpdateBoundsAllowed"): EventFragment;
|
|
75
|
+
}
|
|
76
|
+
export interface SetBoundsEventObject {
|
|
77
|
+
lowerBound: BigNumber;
|
|
78
|
+
upperBound: BigNumber;
|
|
79
|
+
}
|
|
80
|
+
export type SetBoundsEvent = TypedEvent<[
|
|
81
|
+
BigNumber,
|
|
82
|
+
BigNumber
|
|
83
|
+
], SetBoundsEventObject>;
|
|
84
|
+
export type SetBoundsEventFilter = TypedEventFilter<SetBoundsEvent>;
|
|
85
|
+
export interface SetUpdateBoundsAllowedEventObject {
|
|
86
|
+
allowed: boolean;
|
|
87
|
+
}
|
|
88
|
+
export type SetUpdateBoundsAllowedEvent = TypedEvent<[
|
|
89
|
+
boolean
|
|
90
|
+
], SetUpdateBoundsAllowedEventObject>;
|
|
91
|
+
export type SetUpdateBoundsAllowedEventFilter = TypedEventFilter<SetUpdateBoundsAllowedEvent>;
|
|
92
|
+
export interface ILPPriceFeed extends BaseContract {
|
|
93
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
94
|
+
attach(addressOrName: string): this;
|
|
95
|
+
deployed(): Promise<this>;
|
|
96
|
+
interface: ILPPriceFeedInterface;
|
|
97
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
98
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
99
|
+
listeners(eventName?: string): Array<Listener>;
|
|
100
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
101
|
+
removeAllListeners(eventName?: string): this;
|
|
102
|
+
off: OnEvent<this>;
|
|
103
|
+
on: OnEvent<this>;
|
|
104
|
+
once: OnEvent<this>;
|
|
105
|
+
removeListener: OnEvent<this>;
|
|
106
|
+
functions: {
|
|
107
|
+
allowBoundsUpdate(overrides?: Overrides & {
|
|
108
|
+
from?: PromiseOrValue<string>;
|
|
109
|
+
}): Promise<ContractTransaction>;
|
|
110
|
+
decimals(overrides?: CallOverrides): Promise<[number]>;
|
|
111
|
+
description(overrides?: CallOverrides): Promise<[string]>;
|
|
112
|
+
forbidBoundsUpdate(overrides?: Overrides & {
|
|
113
|
+
from?: PromiseOrValue<string>;
|
|
114
|
+
}): Promise<ContractTransaction>;
|
|
115
|
+
getAggregatePrice(overrides?: CallOverrides): Promise<[BigNumber] & {
|
|
116
|
+
answer: BigNumber;
|
|
117
|
+
}>;
|
|
118
|
+
getLPExchangeRate(overrides?: CallOverrides): Promise<[BigNumber] & {
|
|
119
|
+
exchangeRate: BigNumber;
|
|
120
|
+
}>;
|
|
121
|
+
getScale(overrides?: CallOverrides): Promise<[BigNumber] & {
|
|
122
|
+
scale: BigNumber;
|
|
123
|
+
}>;
|
|
124
|
+
lastBoundsUpdate(overrides?: CallOverrides): Promise<[number]>;
|
|
125
|
+
latestRoundData(overrides?: CallOverrides): Promise<[
|
|
126
|
+
BigNumber,
|
|
127
|
+
BigNumber,
|
|
128
|
+
BigNumber,
|
|
129
|
+
BigNumber,
|
|
130
|
+
BigNumber
|
|
131
|
+
] & {
|
|
132
|
+
answer: BigNumber;
|
|
133
|
+
updatedAt: BigNumber;
|
|
134
|
+
}>;
|
|
135
|
+
lowerBound(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
136
|
+
lpContract(overrides?: CallOverrides): Promise<[string]>;
|
|
137
|
+
lpToken(overrides?: CallOverrides): Promise<[string]>;
|
|
138
|
+
priceFeedType(overrides?: CallOverrides): Promise<[number]>;
|
|
139
|
+
priceOracle(overrides?: CallOverrides): Promise<[string]>;
|
|
140
|
+
setLimiter(newLowerBound: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
141
|
+
from?: PromiseOrValue<string>;
|
|
142
|
+
}): Promise<ContractTransaction>;
|
|
143
|
+
skipPriceCheck(overrides?: CallOverrides): Promise<[boolean]>;
|
|
144
|
+
updateBounds(updateData: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
145
|
+
from?: PromiseOrValue<string>;
|
|
146
|
+
}): Promise<ContractTransaction>;
|
|
147
|
+
updateBoundsAllowed(overrides?: CallOverrides): Promise<[boolean]>;
|
|
148
|
+
upperBound(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
149
|
+
version(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
150
|
+
};
|
|
151
|
+
allowBoundsUpdate(overrides?: Overrides & {
|
|
152
|
+
from?: PromiseOrValue<string>;
|
|
153
|
+
}): Promise<ContractTransaction>;
|
|
154
|
+
decimals(overrides?: CallOverrides): Promise<number>;
|
|
155
|
+
description(overrides?: CallOverrides): Promise<string>;
|
|
156
|
+
forbidBoundsUpdate(overrides?: Overrides & {
|
|
157
|
+
from?: PromiseOrValue<string>;
|
|
158
|
+
}): Promise<ContractTransaction>;
|
|
159
|
+
getAggregatePrice(overrides?: CallOverrides): Promise<BigNumber>;
|
|
160
|
+
getLPExchangeRate(overrides?: CallOverrides): Promise<BigNumber>;
|
|
161
|
+
getScale(overrides?: CallOverrides): Promise<BigNumber>;
|
|
162
|
+
lastBoundsUpdate(overrides?: CallOverrides): Promise<number>;
|
|
163
|
+
latestRoundData(overrides?: CallOverrides): Promise<[
|
|
164
|
+
BigNumber,
|
|
165
|
+
BigNumber,
|
|
166
|
+
BigNumber,
|
|
167
|
+
BigNumber,
|
|
168
|
+
BigNumber
|
|
169
|
+
] & {
|
|
170
|
+
answer: BigNumber;
|
|
171
|
+
updatedAt: BigNumber;
|
|
172
|
+
}>;
|
|
173
|
+
lowerBound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
174
|
+
lpContract(overrides?: CallOverrides): Promise<string>;
|
|
175
|
+
lpToken(overrides?: CallOverrides): Promise<string>;
|
|
176
|
+
priceFeedType(overrides?: CallOverrides): Promise<number>;
|
|
177
|
+
priceOracle(overrides?: CallOverrides): Promise<string>;
|
|
178
|
+
setLimiter(newLowerBound: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
179
|
+
from?: PromiseOrValue<string>;
|
|
180
|
+
}): Promise<ContractTransaction>;
|
|
181
|
+
skipPriceCheck(overrides?: CallOverrides): Promise<boolean>;
|
|
182
|
+
updateBounds(updateData: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
183
|
+
from?: PromiseOrValue<string>;
|
|
184
|
+
}): Promise<ContractTransaction>;
|
|
185
|
+
updateBoundsAllowed(overrides?: CallOverrides): Promise<boolean>;
|
|
186
|
+
upperBound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
187
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
188
|
+
callStatic: {
|
|
189
|
+
allowBoundsUpdate(overrides?: CallOverrides): Promise<void>;
|
|
190
|
+
decimals(overrides?: CallOverrides): Promise<number>;
|
|
191
|
+
description(overrides?: CallOverrides): Promise<string>;
|
|
192
|
+
forbidBoundsUpdate(overrides?: CallOverrides): Promise<void>;
|
|
193
|
+
getAggregatePrice(overrides?: CallOverrides): Promise<BigNumber>;
|
|
194
|
+
getLPExchangeRate(overrides?: CallOverrides): Promise<BigNumber>;
|
|
195
|
+
getScale(overrides?: CallOverrides): Promise<BigNumber>;
|
|
196
|
+
lastBoundsUpdate(overrides?: CallOverrides): Promise<number>;
|
|
197
|
+
latestRoundData(overrides?: CallOverrides): Promise<[
|
|
198
|
+
BigNumber,
|
|
199
|
+
BigNumber,
|
|
200
|
+
BigNumber,
|
|
201
|
+
BigNumber,
|
|
202
|
+
BigNumber
|
|
203
|
+
] & {
|
|
204
|
+
answer: BigNumber;
|
|
205
|
+
updatedAt: BigNumber;
|
|
206
|
+
}>;
|
|
207
|
+
lowerBound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
208
|
+
lpContract(overrides?: CallOverrides): Promise<string>;
|
|
209
|
+
lpToken(overrides?: CallOverrides): Promise<string>;
|
|
210
|
+
priceFeedType(overrides?: CallOverrides): Promise<number>;
|
|
211
|
+
priceOracle(overrides?: CallOverrides): Promise<string>;
|
|
212
|
+
setLimiter(newLowerBound: PromiseOrValue<BigNumberish>, overrides?: CallOverrides): Promise<void>;
|
|
213
|
+
skipPriceCheck(overrides?: CallOverrides): Promise<boolean>;
|
|
214
|
+
updateBounds(updateData: PromiseOrValue<BytesLike>, overrides?: CallOverrides): Promise<void>;
|
|
215
|
+
updateBoundsAllowed(overrides?: CallOverrides): Promise<boolean>;
|
|
216
|
+
upperBound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
217
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
218
|
+
};
|
|
219
|
+
filters: {
|
|
220
|
+
"SetBounds(uint256,uint256)"(lowerBound?: null, upperBound?: null): SetBoundsEventFilter;
|
|
221
|
+
SetBounds(lowerBound?: null, upperBound?: null): SetBoundsEventFilter;
|
|
222
|
+
"SetUpdateBoundsAllowed(bool)"(allowed?: null): SetUpdateBoundsAllowedEventFilter;
|
|
223
|
+
SetUpdateBoundsAllowed(allowed?: null): SetUpdateBoundsAllowedEventFilter;
|
|
224
|
+
};
|
|
225
|
+
estimateGas: {
|
|
226
|
+
allowBoundsUpdate(overrides?: Overrides & {
|
|
227
|
+
from?: PromiseOrValue<string>;
|
|
228
|
+
}): Promise<BigNumber>;
|
|
229
|
+
decimals(overrides?: CallOverrides): Promise<BigNumber>;
|
|
230
|
+
description(overrides?: CallOverrides): Promise<BigNumber>;
|
|
231
|
+
forbidBoundsUpdate(overrides?: Overrides & {
|
|
232
|
+
from?: PromiseOrValue<string>;
|
|
233
|
+
}): Promise<BigNumber>;
|
|
234
|
+
getAggregatePrice(overrides?: CallOverrides): Promise<BigNumber>;
|
|
235
|
+
getLPExchangeRate(overrides?: CallOverrides): Promise<BigNumber>;
|
|
236
|
+
getScale(overrides?: CallOverrides): Promise<BigNumber>;
|
|
237
|
+
lastBoundsUpdate(overrides?: CallOverrides): Promise<BigNumber>;
|
|
238
|
+
latestRoundData(overrides?: CallOverrides): Promise<BigNumber>;
|
|
239
|
+
lowerBound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
240
|
+
lpContract(overrides?: CallOverrides): Promise<BigNumber>;
|
|
241
|
+
lpToken(overrides?: CallOverrides): Promise<BigNumber>;
|
|
242
|
+
priceFeedType(overrides?: CallOverrides): Promise<BigNumber>;
|
|
243
|
+
priceOracle(overrides?: CallOverrides): Promise<BigNumber>;
|
|
244
|
+
setLimiter(newLowerBound: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
245
|
+
from?: PromiseOrValue<string>;
|
|
246
|
+
}): Promise<BigNumber>;
|
|
247
|
+
skipPriceCheck(overrides?: CallOverrides): Promise<BigNumber>;
|
|
248
|
+
updateBounds(updateData: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
249
|
+
from?: PromiseOrValue<string>;
|
|
250
|
+
}): Promise<BigNumber>;
|
|
251
|
+
updateBoundsAllowed(overrides?: CallOverrides): Promise<BigNumber>;
|
|
252
|
+
upperBound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
253
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
254
|
+
};
|
|
255
|
+
populateTransaction: {
|
|
256
|
+
allowBoundsUpdate(overrides?: Overrides & {
|
|
257
|
+
from?: PromiseOrValue<string>;
|
|
258
|
+
}): Promise<PopulatedTransaction>;
|
|
259
|
+
decimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
260
|
+
description(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
261
|
+
forbidBoundsUpdate(overrides?: Overrides & {
|
|
262
|
+
from?: PromiseOrValue<string>;
|
|
263
|
+
}): Promise<PopulatedTransaction>;
|
|
264
|
+
getAggregatePrice(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
265
|
+
getLPExchangeRate(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
266
|
+
getScale(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
267
|
+
lastBoundsUpdate(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
268
|
+
latestRoundData(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
269
|
+
lowerBound(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
270
|
+
lpContract(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
271
|
+
lpToken(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
272
|
+
priceFeedType(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
273
|
+
priceOracle(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
274
|
+
setLimiter(newLowerBound: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
275
|
+
from?: PromiseOrValue<string>;
|
|
276
|
+
}): Promise<PopulatedTransaction>;
|
|
277
|
+
skipPriceCheck(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
278
|
+
updateBounds(updateData: PromiseOrValue<BytesLike>, overrides?: Overrides & {
|
|
279
|
+
from?: PromiseOrValue<string>;
|
|
280
|
+
}): Promise<PopulatedTransaction>;
|
|
281
|
+
updateBoundsAllowed(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
282
|
+
upperBound(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
283
|
+
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, Signer, utils } from "ethers";
|
|
2
|
+
import type { EventFragment } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../common";
|
|
5
|
+
export interface ILPPriceFeedEventsInterface extends utils.Interface {
|
|
6
|
+
functions: {};
|
|
7
|
+
events: {
|
|
8
|
+
"SetBounds(uint256,uint256)": EventFragment;
|
|
9
|
+
"SetUpdateBoundsAllowed(bool)": EventFragment;
|
|
10
|
+
};
|
|
11
|
+
getEvent(nameOrSignatureOrTopic: "SetBounds"): EventFragment;
|
|
12
|
+
getEvent(nameOrSignatureOrTopic: "SetUpdateBoundsAllowed"): EventFragment;
|
|
13
|
+
}
|
|
14
|
+
export interface SetBoundsEventObject {
|
|
15
|
+
lowerBound: BigNumber;
|
|
16
|
+
upperBound: BigNumber;
|
|
17
|
+
}
|
|
18
|
+
export type SetBoundsEvent = TypedEvent<[
|
|
19
|
+
BigNumber,
|
|
20
|
+
BigNumber
|
|
21
|
+
], SetBoundsEventObject>;
|
|
22
|
+
export type SetBoundsEventFilter = TypedEventFilter<SetBoundsEvent>;
|
|
23
|
+
export interface SetUpdateBoundsAllowedEventObject {
|
|
24
|
+
allowed: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type SetUpdateBoundsAllowedEvent = TypedEvent<[
|
|
27
|
+
boolean
|
|
28
|
+
], SetUpdateBoundsAllowedEventObject>;
|
|
29
|
+
export type SetUpdateBoundsAllowedEventFilter = TypedEventFilter<SetUpdateBoundsAllowedEvent>;
|
|
30
|
+
export interface ILPPriceFeedEvents extends BaseContract {
|
|
31
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
32
|
+
attach(addressOrName: string): this;
|
|
33
|
+
deployed(): Promise<this>;
|
|
34
|
+
interface: ILPPriceFeedEventsInterface;
|
|
35
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
36
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
37
|
+
listeners(eventName?: string): Array<Listener>;
|
|
38
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
39
|
+
removeAllListeners(eventName?: string): this;
|
|
40
|
+
off: OnEvent<this>;
|
|
41
|
+
on: OnEvent<this>;
|
|
42
|
+
once: OnEvent<this>;
|
|
43
|
+
removeListener: OnEvent<this>;
|
|
44
|
+
functions: {};
|
|
45
|
+
callStatic: {};
|
|
46
|
+
filters: {
|
|
47
|
+
"SetBounds(uint256,uint256)"(lowerBound?: null, upperBound?: null): SetBoundsEventFilter;
|
|
48
|
+
SetBounds(lowerBound?: null, upperBound?: null): SetBoundsEventFilter;
|
|
49
|
+
"SetUpdateBoundsAllowed(bool)"(allowed?: null): SetUpdateBoundsAllowedEventFilter;
|
|
50
|
+
SetUpdateBoundsAllowed(allowed?: null): SetUpdateBoundsAllowedEventFilter;
|
|
51
|
+
};
|
|
52
|
+
estimateGas: {};
|
|
53
|
+
populateTransaction: {};
|
|
54
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BaseContract, Signer, utils } from "ethers";
|
|
2
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
3
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../common";
|
|
4
|
+
export interface ILPPriceFeedExceptionsInterface extends utils.Interface {
|
|
5
|
+
functions: {};
|
|
6
|
+
events: {};
|
|
7
|
+
}
|
|
8
|
+
export interface ILPPriceFeedExceptions extends BaseContract {
|
|
9
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
10
|
+
attach(addressOrName: string): this;
|
|
11
|
+
deployed(): Promise<this>;
|
|
12
|
+
interface: ILPPriceFeedExceptionsInterface;
|
|
13
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
14
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
15
|
+
listeners(eventName?: string): Array<Listener>;
|
|
16
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
17
|
+
removeAllListeners(eventName?: string): this;
|
|
18
|
+
off: OnEvent<this>;
|
|
19
|
+
on: OnEvent<this>;
|
|
20
|
+
once: OnEvent<this>;
|
|
21
|
+
removeListener: OnEvent<this>;
|
|
22
|
+
functions: {};
|
|
23
|
+
callStatic: {};
|
|
24
|
+
filters: {};
|
|
25
|
+
estimateGas: {};
|
|
26
|
+
populateTransaction: {};
|
|
27
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Signer } from "ethers";
|
|
2
|
+
import type { Provider } from "@ethersproject/providers";
|
|
3
|
+
import type { ILPPriceFeedEvents, ILPPriceFeedEventsInterface } from "../../ILPPriceFeed.sol/ILPPriceFeedEvents";
|
|
4
|
+
export declare class ILPPriceFeedEvents__factory {
|
|
5
|
+
static readonly abi: readonly [{
|
|
6
|
+
readonly anonymous: false;
|
|
7
|
+
readonly inputs: readonly [{
|
|
8
|
+
readonly indexed: false;
|
|
9
|
+
readonly internalType: "uint256";
|
|
10
|
+
readonly name: "lowerBound";
|
|
11
|
+
readonly type: "uint256";
|
|
12
|
+
}, {
|
|
13
|
+
readonly indexed: false;
|
|
14
|
+
readonly internalType: "uint256";
|
|
15
|
+
readonly name: "upperBound";
|
|
16
|
+
readonly type: "uint256";
|
|
17
|
+
}];
|
|
18
|
+
readonly name: "SetBounds";
|
|
19
|
+
readonly type: "event";
|
|
20
|
+
}, {
|
|
21
|
+
readonly anonymous: false;
|
|
22
|
+
readonly inputs: readonly [{
|
|
23
|
+
readonly indexed: false;
|
|
24
|
+
readonly internalType: "bool";
|
|
25
|
+
readonly name: "allowed";
|
|
26
|
+
readonly type: "bool";
|
|
27
|
+
}];
|
|
28
|
+
readonly name: "SetUpdateBoundsAllowed";
|
|
29
|
+
readonly type: "event";
|
|
30
|
+
}];
|
|
31
|
+
static createInterface(): ILPPriceFeedEventsInterface;
|
|
32
|
+
static connect(address: string, signerOrProvider: Signer | Provider): ILPPriceFeedEvents;
|
|
33
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Autogenerated file. Do not edit manually. */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ILPPriceFeedEvents__factory = void 0;
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
anonymous: false,
|
|
11
|
+
inputs: [
|
|
12
|
+
{
|
|
13
|
+
indexed: false,
|
|
14
|
+
internalType: "uint256",
|
|
15
|
+
name: "lowerBound",
|
|
16
|
+
type: "uint256",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
indexed: false,
|
|
20
|
+
internalType: "uint256",
|
|
21
|
+
name: "upperBound",
|
|
22
|
+
type: "uint256",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
name: "SetBounds",
|
|
26
|
+
type: "event",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
anonymous: false,
|
|
30
|
+
inputs: [
|
|
31
|
+
{
|
|
32
|
+
indexed: false,
|
|
33
|
+
internalType: "bool",
|
|
34
|
+
name: "allowed",
|
|
35
|
+
type: "bool",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
name: "SetUpdateBoundsAllowed",
|
|
39
|
+
type: "event",
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
class ILPPriceFeedEvents__factory {
|
|
43
|
+
static abi = _abi;
|
|
44
|
+
static createInterface() {
|
|
45
|
+
return new ethers_1.utils.Interface(_abi);
|
|
46
|
+
}
|
|
47
|
+
static connect(address, signerOrProvider) {
|
|
48
|
+
return new ethers_1.Contract(address, _abi, signerOrProvider);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.ILPPriceFeedEvents__factory = ILPPriceFeedEvents__factory;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Signer } from "ethers";
|
|
2
|
+
import type { Provider } from "@ethersproject/providers";
|
|
3
|
+
import type { ILPPriceFeedExceptions, ILPPriceFeedExceptionsInterface } from "../../ILPPriceFeed.sol/ILPPriceFeedExceptions";
|
|
4
|
+
export declare class ILPPriceFeedExceptions__factory {
|
|
5
|
+
static readonly abi: readonly [{
|
|
6
|
+
readonly inputs: readonly [];
|
|
7
|
+
readonly name: "ExchangeRateOutOfBoundsException";
|
|
8
|
+
readonly type: "error";
|
|
9
|
+
}, {
|
|
10
|
+
readonly inputs: readonly [];
|
|
11
|
+
readonly name: "ReserveFeedMustNotBeSelfException";
|
|
12
|
+
readonly type: "error";
|
|
13
|
+
}, {
|
|
14
|
+
readonly inputs: readonly [];
|
|
15
|
+
readonly name: "UpdateBoundsBeforeCooldownException";
|
|
16
|
+
readonly type: "error";
|
|
17
|
+
}, {
|
|
18
|
+
readonly inputs: readonly [];
|
|
19
|
+
readonly name: "UpdateBoundsNotAllowedException";
|
|
20
|
+
readonly type: "error";
|
|
21
|
+
}];
|
|
22
|
+
static createInterface(): ILPPriceFeedExceptionsInterface;
|
|
23
|
+
static connect(address: string, signerOrProvider: Signer | Provider): ILPPriceFeedExceptions;
|
|
24
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* Autogenerated file. Do not edit manually. */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ILPPriceFeedExceptions__factory = void 0;
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [],
|
|
11
|
+
name: "ExchangeRateOutOfBoundsException",
|
|
12
|
+
type: "error",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
inputs: [],
|
|
16
|
+
name: "ReserveFeedMustNotBeSelfException",
|
|
17
|
+
type: "error",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
inputs: [],
|
|
21
|
+
name: "UpdateBoundsBeforeCooldownException",
|
|
22
|
+
type: "error",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
inputs: [],
|
|
26
|
+
name: "UpdateBoundsNotAllowedException",
|
|
27
|
+
type: "error",
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
class ILPPriceFeedExceptions__factory {
|
|
31
|
+
static abi = _abi;
|
|
32
|
+
static createInterface() {
|
|
33
|
+
return new ethers_1.utils.Interface(_abi);
|
|
34
|
+
}
|
|
35
|
+
static connect(address, signerOrProvider) {
|
|
36
|
+
return new ethers_1.Contract(address, _abi, signerOrProvider);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ILPPriceFeedExceptions__factory = ILPPriceFeedExceptions__factory;
|