@gearbox-protocol/sdk 18.2.0-next.11 → 18.2.0-next.13
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/dist/cjs/abi/310/iKillSwitchProxy.js +130 -0
- package/dist/cjs/dev/AccountOpener.js +1 -1
- package/dist/cjs/dev/withdrawalUtils.js +1 -1
- package/dist/cjs/history/trace/extractTransfers.js +1 -1
- package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +2 -2
- package/dist/cjs/onchain/accounts/liquidations/LiquidationsService.js +1 -1
- package/dist/cjs/onchain/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +2 -1
- package/dist/cjs/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +2 -1
- package/dist/cjs/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +2 -1
- package/dist/cjs/onchain/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
- package/dist/cjs/onchain/base/TokensMeta.js +3 -3
- package/dist/cjs/onchain/core/createAddressProvider.js +1 -1
- package/dist/cjs/onchain/market/adapters/contracts/AccountMigratorAdapterContract.js +1 -1
- package/dist/cjs/onchain/market/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/cjs/onchain/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/cjs/onchain/market/pool/PoolV310Contract.js +1 -1
- package/dist/cjs/onchain/market/rwa/createDegenNFT.js +1 -1
- package/dist/cjs/onchain/market/zapper/IETHZapperContract.js +2 -1
- package/dist/cjs/onchain/market/zapper/ZapperContract.js +1 -1
- package/dist/cjs/onchain/preview/preview/previewPoolPositionOperation.js +2 -2
- package/dist/cjs/onchain/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/cjs/permissionless/api/index.js +7 -3
- package/dist/cjs/permissionless/api/oracles/PermissionlessOracles.js +11 -11
- package/dist/cjs/permissionless/api/oracles/index.js +7 -3
- package/dist/cjs/permissionless/api/oracles/score/formula.js +44 -82
- package/dist/cjs/permissionless/api/oracles/score/index.js +6 -3
- package/dist/cjs/permissionless/api/oracles/score/run.js +129 -46
- package/dist/cjs/permissionless/api/oracles/stress/index.js +1 -0
- package/dist/cjs/permissionless/api/oracles/stress/run.js +5 -2
- package/dist/cjs/permissionless/bindings/bytecode-repository.js +8 -0
- package/dist/cjs/permissionless/bindings/governance/governor.js +1 -1
- package/dist/cjs/permissionless/bindings/index.js +7 -2
- package/dist/cjs/permissionless/bindings/kill-switch-proxy.js +188 -0
- package/dist/cjs/permissionless/bindings/market-configurator-factory.js +39 -1
- package/dist/cjs/permissionless/bindings/market-configurator.js +142 -0
- package/dist/cjs/permissionless/index.js +15 -5
- package/dist/cjs/permissionless/utils/index.js +1 -0
- package/dist/cjs/permissionless/utils/literals.js +2 -0
- package/dist/esm/abi/310/iKillSwitchProxy.js +129 -0
- package/dist/esm/permissionless/api/index.js +3 -3
- package/dist/esm/permissionless/api/oracles/PermissionlessOracles.js +11 -11
- package/dist/esm/permissionless/api/oracles/index.js +3 -3
- package/dist/esm/permissionless/api/oracles/score/formula.js +39 -80
- package/dist/esm/permissionless/api/oracles/score/index.js +2 -2
- package/dist/esm/permissionless/api/oracles/score/run.js +131 -48
- package/dist/esm/permissionless/api/oracles/stress/index.js +2 -2
- package/dist/esm/permissionless/api/oracles/stress/run.js +5 -3
- package/dist/esm/permissionless/bindings/bytecode-repository.js +8 -0
- package/dist/esm/permissionless/bindings/governance/governor.js +1 -1
- package/dist/esm/permissionless/bindings/index.js +4 -3
- package/dist/esm/permissionless/bindings/kill-switch-proxy.js +184 -0
- package/dist/esm/permissionless/bindings/market-configurator-factory.js +37 -0
- package/dist/esm/permissionless/bindings/market-configurator.js +143 -1
- package/dist/esm/permissionless/index.js +7 -6
- package/dist/esm/permissionless/utils/index.js +2 -2
- package/dist/esm/permissionless/utils/literals.js +2 -1
- package/dist/types/abi/310/iKillSwitchProxy.d.ts +114 -0
- package/dist/types/permissionless/api/index.d.ts +4 -4
- package/dist/types/permissionless/api/oracles/PermissionlessOracles.d.ts +11 -11
- package/dist/types/permissionless/api/oracles/index.d.ts +4 -4
- package/dist/types/permissionless/api/oracles/score/formula.d.ts +31 -38
- package/dist/types/permissionless/api/oracles/score/index.d.ts +3 -3
- package/dist/types/permissionless/api/oracles/score/run.d.ts +7 -4
- package/dist/types/permissionless/api/oracles/score/types.d.ts +50 -22
- package/dist/types/permissionless/api/oracles/stress/index.d.ts +2 -2
- package/dist/types/permissionless/api/oracles/stress/run.d.ts +17 -1
- package/dist/types/permissionless/bindings/bytecode-repository.d.ts +10 -1
- package/dist/types/permissionless/bindings/index.d.ts +4 -3
- package/dist/types/permissionless/bindings/kill-switch-proxy.d.ts +205 -0
- package/dist/types/permissionless/bindings/market-configurator-factory.d.ts +30 -0
- package/dist/types/permissionless/bindings/market-configurator.d.ts +30 -1
- package/dist/types/permissionless/bindings/types.d.ts +27 -0
- package/dist/types/permissionless/index.d.ts +8 -7
- package/dist/types/permissionless/utils/index.d.ts +2 -2
- package/dist/types/permissionless/utils/literals.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10,16 +10,47 @@ export interface ScoredFeed {
|
|
|
10
10
|
/** Gearbox contract type of the feed itself, `""` for one it never deployed. */
|
|
11
11
|
contractType: string;
|
|
12
12
|
/**
|
|
13
|
-
* Every
|
|
14
|
-
*
|
|
13
|
+
* Every source group beneath the feed: `"Chainlink"`, `"Lido"`, or the
|
|
14
|
+
* description of a source nothing could name.
|
|
15
15
|
*/
|
|
16
16
|
sources: string[];
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* What one source group, lying, does to the price a market holds for an
|
|
20
|
+
* asset.
|
|
21
|
+
**/
|
|
22
|
+
export interface GroupImpact {
|
|
23
|
+
group: string;
|
|
24
|
+
/** The group was recognised rather than inferred from one feed's name. */
|
|
25
|
+
identified: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The group's sources this market's feeds read, by what they say they are:
|
|
28
|
+
* `"stETH / ETH"`, `"ETH / USD"`.
|
|
29
|
+
*/
|
|
30
|
+
feeds: string[];
|
|
31
|
+
/** Which of the market's feeds read the group. */
|
|
32
|
+
reaches: "main" | "reserve" | "both";
|
|
33
|
+
/**
|
|
34
|
+
* The final price under the lie over the final price now, in USD. `null` is
|
|
35
|
+
* a price that stopped answering.
|
|
36
|
+
*/
|
|
37
|
+
factor: number | null;
|
|
38
|
+
/**
|
|
39
|
+
* The same, against the market's own underlying: what an account is
|
|
40
|
+
* valued by. A lie that moves collateral and underlying alike leaves it at
|
|
41
|
+
* 1. `null` where either price stopped answering.
|
|
42
|
+
*/
|
|
43
|
+
ratioFactor: number | null;
|
|
44
|
+
/** 0 to 10, by {@link scoreOfFactor}. */
|
|
45
|
+
score: number;
|
|
46
|
+
}
|
|
18
47
|
/**
|
|
19
48
|
* How well one market guards one asset's price, out of 10.
|
|
20
49
|
*
|
|
21
|
-
*
|
|
22
|
-
* to
|
|
50
|
+
* Every source group behind the asset's feeds is made, one group at a time,
|
|
51
|
+
* to answer {@link SCORE_MULTIPLIER} times what it answers now. The market
|
|
52
|
+
* scores by the group that moves its final price — `min(main, reserve)` —
|
|
53
|
+
* the furthest.
|
|
23
54
|
**/
|
|
24
55
|
export interface MarketScore {
|
|
25
56
|
market: Address;
|
|
@@ -30,31 +61,28 @@ export interface MarketScore {
|
|
|
30
61
|
/** `null` where the market holds no reserve for the asset at all. */
|
|
31
62
|
reserve: ScoredFeed | null;
|
|
32
63
|
/**
|
|
33
|
-
* The
|
|
34
|
-
* the
|
|
64
|
+
* The final price is `min(main, reserve)`: a reserve is present, is not a
|
|
65
|
+
* `ZeroPriceFeed`, and answers. Where it is not, the final price is the
|
|
66
|
+
* main feed's alone.
|
|
35
67
|
*/
|
|
36
68
|
hasReserve: boolean;
|
|
69
|
+
/** The final price now, in USD. */
|
|
70
|
+
price: number;
|
|
71
|
+
/** Every group behind the two feeds, the most damaging first. */
|
|
72
|
+
impacts: GroupImpact[];
|
|
73
|
+
/** The group the score comes from; `null` where no source feeds the price. */
|
|
74
|
+
worst: GroupImpact | null;
|
|
37
75
|
/**
|
|
38
|
-
* The
|
|
39
|
-
* `1 − |shared| / |all|`. 1 for feeds with nothing in common, 0 for feeds
|
|
40
|
-
* on the same sources — and 0 where {@link hasReserve} is false.
|
|
41
|
-
*/
|
|
42
|
-
independence: number;
|
|
43
|
-
/** Main or reserve is a `BoundedPriceFeed` or a Gearbox LP feed. */
|
|
44
|
-
bounded: boolean;
|
|
45
|
-
/** The sources the two feeds have in common, by name. */
|
|
46
|
-
sharedSources: string[];
|
|
47
|
-
/**
|
|
48
|
-
* The independence counted here rests on a source nothing could name.
|
|
76
|
+
* The score rests on a source nothing could name.
|
|
49
77
|
*
|
|
50
|
-
* Such a source
|
|
51
|
-
*
|
|
52
|
-
*
|
|
78
|
+
* Such a source is a group of its own and is perturbed alone, so where one
|
|
79
|
+
* feed reads it and the other does not, the other is taken to hold — which
|
|
80
|
+
* it would not if one operator stood behind both.
|
|
53
81
|
*/
|
|
54
82
|
unverified: boolean;
|
|
55
83
|
score: number;
|
|
56
|
-
/**
|
|
57
|
-
|
|
84
|
+
/** How the market is set up, where that explains its score. */
|
|
85
|
+
notes: string[];
|
|
58
86
|
}
|
|
59
87
|
/**
|
|
60
88
|
* One asset's score: its worst market's.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BreakingPoint, FeedOutcome, GroupReport, GroupScenarioOutcome, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs } from "./types.js";
|
|
2
2
|
import { TreeNode, classifySources, sourcesByFeed } from "./classify.js";
|
|
3
3
|
import { UNBOUNDED_DOWN, UNBOUNDED_UP, groupOverride, perturb, rateStub, roundDataStub } from "./override.js";
|
|
4
|
-
import { DEFAULT_SCENARIOS, RATE_FEED_TYPE, readForest, readRateTargets, runStressTest } from "./run.js";
|
|
4
|
+
import { DEFAULT_SCENARIOS, RATE_FEED_TYPE, readForest, readRateTargets, readUnder, runStressTest } from "./run.js";
|
|
5
5
|
import { scoreGroup, slotHarm, verdictOf } from "./score.js";
|
|
6
|
-
export { BreakingPoint, DEFAULT_SCENARIOS, FeedOutcome, GroupReport, GroupScenarioOutcome, RATE_FEED_TYPE, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs, TreeNode, UNBOUNDED_DOWN, UNBOUNDED_UP, classifySources, groupOverride, perturb, rateStub, readForest, readRateTargets, roundDataStub, runStressTest, scoreGroup, slotHarm, sourcesByFeed, verdictOf };
|
|
6
|
+
export { BreakingPoint, DEFAULT_SCENARIOS, FeedOutcome, GroupReport, GroupScenarioOutcome, RATE_FEED_TYPE, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs, TreeNode, UNBOUNDED_DOWN, UNBOUNDED_UP, classifySources, groupOverride, perturb, rateStub, readForest, readRateTargets, readUnder, roundDataStub, runStressTest, scoreGroup, slotHarm, sourcesByFeed, verdictOf };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { StressReport, StressScenario } from "./types.js";
|
|
1
|
+
import { StressReport, StressScenario, StressSource } from "./types.js";
|
|
2
2
|
import { PermissionlessMarketSlot } from "../types.js";
|
|
3
3
|
import { TreeNode } from "./classify.js";
|
|
4
4
|
import { Address, Chain, PublicClient, Transport } from "viem";
|
|
@@ -49,6 +49,22 @@ export declare function readRateTargets(client: PublicClient<Transport, Chain>,
|
|
|
49
49
|
upper: bigint;
|
|
50
50
|
}>;
|
|
51
51
|
}>;
|
|
52
|
+
/**
|
|
53
|
+
* What every feed answers with one group's sources overridden.
|
|
54
|
+
*
|
|
55
|
+
* One `eth_call` for the whole chain: the overrides go in once and the feeds
|
|
56
|
+
* are read through a multicall inside them, so a group costs a round trip per
|
|
57
|
+
* scenario rather than a round trip per feed. A feed that reverts comes back
|
|
58
|
+
* `null`, which is an outcome and not an error.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readUnder(client: PublicClient<Transport, Chain>, feeds: Address[], sources: StressSource[], multiplier: number, updatedAt: bigint,
|
|
61
|
+
/**
|
|
62
|
+
* Sources re-answered as they stand, under a fresh timestamp: a pull feed
|
|
63
|
+
* nobody has pushed to lately is stale, and a feed over it reverts on that
|
|
64
|
+
* before anything about the price is learnt. `sources` win where the two
|
|
65
|
+
* overlap.
|
|
66
|
+
*/
|
|
67
|
+
freshen?: StressSource[]): Promise<Map<Address, bigint | null>>;
|
|
52
68
|
/**
|
|
53
69
|
* Every source behind one chain's markets, put through the sweep a group at a
|
|
54
70
|
* time.
|
|
@@ -1145,11 +1145,15 @@ declare const abi: readonly [{
|
|
|
1145
1145
|
}];
|
|
1146
1146
|
readonly name: "VersionNotFoundException";
|
|
1147
1147
|
}];
|
|
1148
|
-
interface ComputeAddressArgs {
|
|
1148
|
+
export interface ComputeAddressArgs {
|
|
1149
1149
|
contractType: string;
|
|
1150
1150
|
version: number;
|
|
1151
1151
|
encodedParams: Hex;
|
|
1152
1152
|
salt: Hex;
|
|
1153
|
+
/**
|
|
1154
|
+
* Deployer, i.e. address that will call `deploy` on the bytecode repository.
|
|
1155
|
+
* It is mixed into the salt, so it is not necessarily the owner of the deployed contract
|
|
1156
|
+
*/
|
|
1153
1157
|
owner: Address;
|
|
1154
1158
|
}
|
|
1155
1159
|
export declare class BytecodeRepositoryContract extends BaseContract<typeof abi> {
|
|
@@ -1171,6 +1175,11 @@ export declare class BytecodeRepositoryContract extends BaseContract<typeof abi>
|
|
|
1171
1175
|
isBytecodeUploaded(hash: `0x${string}`): Promise<boolean>;
|
|
1172
1176
|
isBytecodeAudited(hash: `0x${string}`): Promise<boolean>;
|
|
1173
1177
|
getLatestVersion(type_: string): Promise<bigint>;
|
|
1178
|
+
/**
|
|
1179
|
+
* Returns the latest allowed patch version of the contract type within given minor version
|
|
1180
|
+
* @throws if no bytecode of this contract type and minor version is allowed
|
|
1181
|
+
*/
|
|
1182
|
+
getLatestPatchVersion(type_: string, minorVersion: number): Promise<number>;
|
|
1174
1183
|
getAllowedBytecodeHash(type_: string, version: number): Promise<Hex>;
|
|
1175
1184
|
isPublicDomain(domain: string): Promise<boolean>;
|
|
1176
1185
|
isSystemDomain(domain: string): Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AddressProviderContract } from "./address-provider.js";
|
|
2
|
-
import { BytecodeRepositoryContract } from "./bytecode-repository.js";
|
|
2
|
+
import { BytecodeRepositoryContract, ComputeAddressArgs } from "./bytecode-repository.js";
|
|
3
3
|
import { TokenCompressorContract } from "./compressors/token-compressor.js";
|
|
4
4
|
import { WithdrawalCompressorContract } from "./compressors/withdrawal-compressor.js";
|
|
5
5
|
import "./compressors/index.js";
|
|
@@ -9,7 +9,8 @@ import { GovernorContract } from "./governance/governor.js";
|
|
|
9
9
|
import { TimeLockContract } from "./governance/timelock.js";
|
|
10
10
|
import "./governance/index.js";
|
|
11
11
|
import { InstanceManagerContract } from "./instance-manager.js";
|
|
12
|
-
import {
|
|
12
|
+
import { KILL_SWITCH_PROXY_MINOR_VERSION, KillSwitchProxyContract, KillSwitchProxyNotAllowedError, PreparedKillSwitchProxyDeployment, killSwitchProxySalt } from "./kill-switch-proxy.js";
|
|
13
|
+
import { AccessMode, AddAssetParams, AllowTokenParams, CreditManagerFees, DeployParams, EmergencyAdmin, ForbidAdapterParams, ForbidTokenParams, Market, PauseCreditManagerParams, PeripheryDomain, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, UnpauseCreditManagerParams } from "./types.js";
|
|
13
14
|
import { MarketConfiguratorContract } from "./market-configurator.js";
|
|
14
15
|
import { MarketConfiguratorFactoryContract } from "./market-configurator-factory.js";
|
|
15
16
|
import { PriceFeedStoreContract } from "./price-feed-store.js";
|
|
@@ -17,4 +18,4 @@ import { priceFeedSetupParams } from "./pricefeeds/index.js";
|
|
|
17
18
|
import { RoutingManagerContract } from "./router/routing-manager.js";
|
|
18
19
|
import "./router/index.js";
|
|
19
20
|
import { TreasurySplitterContract } from "./treasury-splitter.js";
|
|
20
|
-
export { AccessMode, AddAssetParams, AddressProviderContract, AllowTokenParams, BytecodeRepositoryContract, ConstructorParams, CreditManagerFees, CrossChainMultisigContract, DeployParams, ForbidAdapterParams, ForbidTokenParams, GovernorContract, InstanceManagerContract, Market, MarketConfiguratorContract, MarketConfiguratorFactoryContract, PauseCreditManagerParams, PeripheryDomain, PriceFeedStoreContract, Proposal, QueuedAndExecutedTransaction, RoutingManagerContract, SafeBatch, SafeMeta, SafeTx, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, TimeLockContract, TimelockTransaction, TimelockTxParams, TokenCompressorContract, TreasurySplitterContract, UnpauseCreditManagerParams, WithdrawalCompressorContract, priceFeedSetupParams };
|
|
21
|
+
export { AccessMode, AddAssetParams, AddressProviderContract, AllowTokenParams, BytecodeRepositoryContract, ComputeAddressArgs, ConstructorParams, CreditManagerFees, CrossChainMultisigContract, DeployParams, EmergencyAdmin, ForbidAdapterParams, ForbidTokenParams, GovernorContract, InstanceManagerContract, KILL_SWITCH_PROXY_MINOR_VERSION, KillSwitchProxyContract, KillSwitchProxyNotAllowedError, Market, MarketConfiguratorContract, MarketConfiguratorFactoryContract, PauseCreditManagerParams, PeripheryDomain, PreparedKillSwitchProxyDeployment, PriceFeedStoreContract, Proposal, QueuedAndExecutedTransaction, RoutingManagerContract, SafeBatch, SafeMeta, SafeTx, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, TimeLockContract, TimelockTransaction, TimelockTxParams, TokenCompressorContract, TreasurySplitterContract, UnpauseCreditManagerParams, WithdrawalCompressorContract, killSwitchProxySalt, priceFeedSetupParams };
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { ParsedCallArgs } from "../../onchain/base/types.js";
|
|
2
|
+
import { RawTx } from "../../onchain/types/transactions.js";
|
|
3
|
+
import { BaseContract } from "../../onchain/base/BaseContract.js";
|
|
4
|
+
import "../../onchain/index.js";
|
|
5
|
+
import { BytecodeRepositoryContract } from "./bytecode-repository.js";
|
|
6
|
+
import { Address, BaseError, Chain, DecodeFunctionDataReturnType, Hex, PublicClient, Transport } from "viem";
|
|
7
|
+
//#region src/permissionless/bindings/kill-switch-proxy.d.ts
|
|
8
|
+
declare const abi: readonly [{
|
|
9
|
+
readonly type: "constructor";
|
|
10
|
+
readonly inputs: readonly [{
|
|
11
|
+
readonly name: "_owner";
|
|
12
|
+
readonly internalType: "address";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "_caller";
|
|
16
|
+
readonly internalType: "address";
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
}];
|
|
19
|
+
readonly stateMutability: "nonpayable";
|
|
20
|
+
}, {
|
|
21
|
+
readonly type: "function";
|
|
22
|
+
readonly inputs: readonly [];
|
|
23
|
+
readonly name: "caller";
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "";
|
|
26
|
+
readonly internalType: "address";
|
|
27
|
+
readonly type: "address";
|
|
28
|
+
}];
|
|
29
|
+
readonly stateMutability: "view";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "function";
|
|
32
|
+
readonly inputs: readonly [];
|
|
33
|
+
readonly name: "contractType";
|
|
34
|
+
readonly outputs: readonly [{
|
|
35
|
+
readonly name: "";
|
|
36
|
+
readonly internalType: "bytes32";
|
|
37
|
+
readonly type: "bytes32";
|
|
38
|
+
}];
|
|
39
|
+
readonly stateMutability: "view";
|
|
40
|
+
}, {
|
|
41
|
+
readonly type: "function";
|
|
42
|
+
readonly inputs: readonly [];
|
|
43
|
+
readonly name: "isKilled";
|
|
44
|
+
readonly outputs: readonly [{
|
|
45
|
+
readonly name: "";
|
|
46
|
+
readonly internalType: "bool";
|
|
47
|
+
readonly type: "bool";
|
|
48
|
+
}];
|
|
49
|
+
readonly stateMutability: "view";
|
|
50
|
+
}, {
|
|
51
|
+
readonly type: "function";
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
readonly name: "kill";
|
|
54
|
+
readonly outputs: readonly [];
|
|
55
|
+
readonly stateMutability: "nonpayable";
|
|
56
|
+
}, {
|
|
57
|
+
readonly type: "function";
|
|
58
|
+
readonly inputs: readonly [];
|
|
59
|
+
readonly name: "owner";
|
|
60
|
+
readonly outputs: readonly [{
|
|
61
|
+
readonly name: "";
|
|
62
|
+
readonly internalType: "address";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
}];
|
|
65
|
+
readonly stateMutability: "view";
|
|
66
|
+
}, {
|
|
67
|
+
readonly type: "function";
|
|
68
|
+
readonly inputs: readonly [{
|
|
69
|
+
readonly name: "target";
|
|
70
|
+
readonly internalType: "address";
|
|
71
|
+
readonly type: "address";
|
|
72
|
+
}, {
|
|
73
|
+
readonly name: "data";
|
|
74
|
+
readonly internalType: "bytes";
|
|
75
|
+
readonly type: "bytes";
|
|
76
|
+
}];
|
|
77
|
+
readonly name: "proxyCall";
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly name: "result";
|
|
80
|
+
readonly internalType: "bytes";
|
|
81
|
+
readonly type: "bytes";
|
|
82
|
+
}];
|
|
83
|
+
readonly stateMutability: "nonpayable";
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "function";
|
|
86
|
+
readonly inputs: readonly [];
|
|
87
|
+
readonly name: "version";
|
|
88
|
+
readonly outputs: readonly [{
|
|
89
|
+
readonly name: "";
|
|
90
|
+
readonly internalType: "uint256";
|
|
91
|
+
readonly type: "uint256";
|
|
92
|
+
}];
|
|
93
|
+
readonly stateMutability: "view";
|
|
94
|
+
}, {
|
|
95
|
+
readonly type: "event";
|
|
96
|
+
readonly anonymous: false;
|
|
97
|
+
readonly inputs: readonly [];
|
|
98
|
+
readonly name: "Killed";
|
|
99
|
+
}, {
|
|
100
|
+
readonly type: "error";
|
|
101
|
+
readonly inputs: readonly [{
|
|
102
|
+
readonly name: "caller";
|
|
103
|
+
readonly internalType: "address";
|
|
104
|
+
readonly type: "address";
|
|
105
|
+
}];
|
|
106
|
+
readonly name: "CallerIsNotOwnerException";
|
|
107
|
+
}, {
|
|
108
|
+
readonly type: "error";
|
|
109
|
+
readonly inputs: readonly [];
|
|
110
|
+
readonly name: "KilledException";
|
|
111
|
+
}, {
|
|
112
|
+
readonly type: "error";
|
|
113
|
+
readonly inputs: readonly [];
|
|
114
|
+
readonly name: "OnlyCallerException";
|
|
115
|
+
}, {
|
|
116
|
+
readonly type: "error";
|
|
117
|
+
readonly inputs: readonly [];
|
|
118
|
+
readonly name: "OwnerSameAsCallerException";
|
|
119
|
+
}];
|
|
120
|
+
/**
|
|
121
|
+
* Minor version of kill switch proxy, the latest allowed patch of it is deployed
|
|
122
|
+
*/
|
|
123
|
+
export declare const KILL_SWITCH_PROXY_MINOR_VERSION = 310;
|
|
124
|
+
/**
|
|
125
|
+
* Salt of kill switch proxy deployed together with market configurator,
|
|
126
|
+
* makes each curator's market configurator get its own proxy
|
|
127
|
+
*/
|
|
128
|
+
export declare function killSwitchProxySalt(curatorName: string): Hex;
|
|
129
|
+
/**
|
|
130
|
+
* Thrown when bytecode repository has no allowed kill switch proxy bytecode,
|
|
131
|
+
* so its address can't be computed and it can't be deployed
|
|
132
|
+
*/
|
|
133
|
+
export declare class KillSwitchProxyNotAllowedError extends BaseError {
|
|
134
|
+
name: string;
|
|
135
|
+
readonly bytecodeRepository: Address;
|
|
136
|
+
constructor(bytecodeRepository: Address);
|
|
137
|
+
}
|
|
138
|
+
export interface PreparedKillSwitchProxyDeployment {
|
|
139
|
+
address: Address;
|
|
140
|
+
version: number;
|
|
141
|
+
encodedParams: Hex;
|
|
142
|
+
salt: Hex;
|
|
143
|
+
isAlreadyDeployed: boolean;
|
|
144
|
+
/**
|
|
145
|
+
* Whether already deployed proxy is killed, always false for not yet deployed one
|
|
146
|
+
*/
|
|
147
|
+
isKilled: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* Bytecode repository `deploy` transaction, must be sent by the deployer
|
|
150
|
+
*/
|
|
151
|
+
tx: RawTx;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Kill switch proxy forwards calls of its `caller` via `proxyCall` until `owner` kills it.
|
|
155
|
+
* It is used as market configurator's emergency admin, so that emergency powers
|
|
156
|
+
* can be revoked instantly without going through the timelock.
|
|
157
|
+
*/
|
|
158
|
+
export declare class KillSwitchProxyContract extends BaseContract<typeof abi> {
|
|
159
|
+
#private;
|
|
160
|
+
constructor(addr: Address, client: PublicClient<Transport, Chain>);
|
|
161
|
+
/**
|
|
162
|
+
* Encodes `constructor(address _owner, address _caller)` params
|
|
163
|
+
* @throws if any address is zero or owner equals caller (constructor reverts in that case)
|
|
164
|
+
*/
|
|
165
|
+
static encodeConstructorParams(args: {
|
|
166
|
+
owner: Address;
|
|
167
|
+
caller: Address;
|
|
168
|
+
}): Hex;
|
|
169
|
+
/**
|
|
170
|
+
* Returns whether some patch of kill switch proxy v3.10 is allowed in bytecode repository
|
|
171
|
+
*/
|
|
172
|
+
static isAvailable(bcr: BytecodeRepositoryContract): Promise<boolean>;
|
|
173
|
+
/**
|
|
174
|
+
* Computes address of kill switch proxy and prepares its deployment via bytecode repository
|
|
175
|
+
* @param bcr - bytecode repository
|
|
176
|
+
* @param args.deployer - address that will send deployment transaction, it is mixed into the salt
|
|
177
|
+
* @param args.owner - address that can kill the proxy
|
|
178
|
+
* @param args.caller - address that can call through the proxy
|
|
179
|
+
* @param args.salt - deployment salt
|
|
180
|
+
* @throws {KillSwitchProxyNotAllowedError} if kill switch proxy is not allowed in bytecode repository
|
|
181
|
+
*/
|
|
182
|
+
static prepareDeploy(bcr: BytecodeRepositoryContract, args: {
|
|
183
|
+
deployer: Address;
|
|
184
|
+
owner: Address;
|
|
185
|
+
caller: Address;
|
|
186
|
+
salt: Hex;
|
|
187
|
+
}): Promise<PreparedKillSwitchProxyDeployment>;
|
|
188
|
+
isKilled(): Promise<boolean>;
|
|
189
|
+
state(): Promise<{
|
|
190
|
+
caller: Address;
|
|
191
|
+
owner: Address;
|
|
192
|
+
isKilled: boolean;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* Wraps transaction into `proxyCall`, must be sent by proxy's caller
|
|
196
|
+
*/
|
|
197
|
+
proxyCallTx(tx: RawTx): RawTx;
|
|
198
|
+
/**
|
|
199
|
+
* Permanently disables `proxyCall`, must be sent by proxy's owner
|
|
200
|
+
*/
|
|
201
|
+
killTx(): RawTx;
|
|
202
|
+
protected parseFunctionParams(params: DecodeFunctionDataReturnType<typeof abi>): ParsedCallArgs;
|
|
203
|
+
}
|
|
204
|
+
//#endregion
|
|
205
|
+
export {};
|
|
@@ -229,6 +229,36 @@ export declare class MarketConfiguratorFactoryContract extends BaseContract<type
|
|
|
229
229
|
curatorName: string;
|
|
230
230
|
deployGovernor: boolean;
|
|
231
231
|
}): RawTx;
|
|
232
|
+
/**
|
|
233
|
+
* Builds transactions that deploy market configurator with kill switch proxy as its emergency admin:
|
|
234
|
+
* 1. kill switch proxy deployment via bytecode repository (skipped if already deployed)
|
|
235
|
+
* 2. market configurator creation with proxy as emergency admin
|
|
236
|
+
*
|
|
237
|
+
* Transactions must be sent in this order by `admin`, e.g. as one Safe batch.
|
|
238
|
+
* When `deployGovernor` is true, proxy also becomes governor's veto admin.
|
|
239
|
+
*
|
|
240
|
+
* @param args.admin - address that sends transactions, becomes market configurator admin
|
|
241
|
+
* @param args.emergencyAdmin - address that executes emergency actions through the proxy
|
|
242
|
+
* @param args.killSwitchOwner - address that can kill the proxy, defaults to `admin`
|
|
243
|
+
* @throws {KillSwitchProxyNotAllowedError} if kill switch proxy is not allowed in bytecode repository,
|
|
244
|
+
* use {@link createMarketConfiguratorTx} to deploy market configurator without it
|
|
245
|
+
*/
|
|
246
|
+
createMarketConfiguratorWithKillSwitchTxs(args: {
|
|
247
|
+
admin: Address;
|
|
248
|
+
emergencyAdmin: Address;
|
|
249
|
+
killSwitchOwner?: Address;
|
|
250
|
+
adminFeeTreasury: Address;
|
|
251
|
+
curatorName: string;
|
|
252
|
+
deployGovernor: boolean;
|
|
253
|
+
}): Promise<{
|
|
254
|
+
killSwitchProxy: Address;
|
|
255
|
+
/**
|
|
256
|
+
* True if proxy with the same deployer, owner, caller and curator name already exists,
|
|
257
|
+
* in which case it is reused and its deployment transaction is omitted
|
|
258
|
+
*/
|
|
259
|
+
isKillSwitchProxyDeployed: boolean;
|
|
260
|
+
txs: RawTx[];
|
|
261
|
+
}>;
|
|
232
262
|
getMarketConfigurators(): Promise<Address[]>;
|
|
233
263
|
getShutdownMarketConfigurators(): Promise<Address[]>;
|
|
234
264
|
syncMarketConfigurators(fromBlock: bigint, toBlock: bigint): Promise<{
|
|
@@ -3,7 +3,7 @@ import { RawTx } from "../../onchain/types/transactions.js";
|
|
|
3
3
|
import { BaseContract } from "../../onchain/base/BaseContract.js";
|
|
4
4
|
import "../../onchain/index.js";
|
|
5
5
|
import { AddressProviderContract } from "./address-provider.js";
|
|
6
|
-
import { AddAssetParams, AllowTokenParams, DeployParams, ForbidAdapterParams, ForbidTokenParams, Market, PauseCreditManagerParams, PeripheryDomain, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, UnpauseCreditManagerParams } from "./types.js";
|
|
6
|
+
import { AddAssetParams, AllowTokenParams, DeployParams, EmergencyAdmin, ForbidAdapterParams, ForbidTokenParams, Market, PauseCreditManagerParams, PeripheryDomain, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, UnpauseCreditManagerParams } from "./types.js";
|
|
7
7
|
import { CreditFactory } from "./factory/credit-factory.js";
|
|
8
8
|
import { LossPolicyFactory } from "./factory/loss-policy-factory.js";
|
|
9
9
|
import { PoolFactory } from "./factory/pool-factory.js";
|
|
@@ -1536,6 +1536,7 @@ declare const abi: readonly [{
|
|
|
1536
1536
|
readonly name: "UnauthorizedFactoryException";
|
|
1537
1537
|
}];
|
|
1538
1538
|
export declare class MarketConfiguratorContract extends BaseContract<typeof abi> {
|
|
1539
|
+
#private;
|
|
1539
1540
|
readonly creditFactory: CreditFactory;
|
|
1540
1541
|
readonly poolFactory: PoolFactory;
|
|
1541
1542
|
readonly priceOracleFactory: PriceOracleFactory;
|
|
@@ -1647,6 +1648,26 @@ export declare class MarketConfiguratorContract extends BaseContract<typeof abi>
|
|
|
1647
1648
|
emergencyLiquidators: Address[];
|
|
1648
1649
|
}>;
|
|
1649
1650
|
multipause(): Promise<Address | undefined>;
|
|
1651
|
+
/**
|
|
1652
|
+
* Returns emergency admin of the market configurator.
|
|
1653
|
+
* If it is a `KILL_SWITCH_PROXY`, emergency transactions must be sent by proxy's caller via `proxyCall`,
|
|
1654
|
+
* otherwise directly by emergency admin itself
|
|
1655
|
+
* @param emergencyAdmin - emergency admin address, read from the market configurator if not provided
|
|
1656
|
+
*/
|
|
1657
|
+
getEmergencyAdmin(emergencyAdmin?: Address): Promise<EmergencyAdmin>;
|
|
1658
|
+
/**
|
|
1659
|
+
* Routes emergency transaction to the market configurator through its emergency admin:
|
|
1660
|
+
* returns transaction as is for direct emergency admin, or wraps it into `proxyCall` of kill switch proxy
|
|
1661
|
+
* @param tx - emergency transaction to the market configurator, e.g. built by `emergencyConfigurePool`
|
|
1662
|
+
* @param emergencyAdmin - result of {@link getEmergencyAdmin}
|
|
1663
|
+
* @throws if transaction is not addressed to this market configurator or kill switch proxy is killed
|
|
1664
|
+
*/
|
|
1665
|
+
wrapEmergencyTx(tx: RawTx, emergencyAdmin: EmergencyAdmin): RawTx;
|
|
1666
|
+
/**
|
|
1667
|
+
* Reads emergency admin and routes emergency transaction through it, see {@link wrapEmergencyTx}
|
|
1668
|
+
* @param tx - emergency transaction to the market configurator, e.g. built by `emergencyConfigurePool`
|
|
1669
|
+
*/
|
|
1670
|
+
emergencyTx(tx: RawTx): Promise<RawTx>;
|
|
1650
1671
|
grantRole(role: string, address: Address): RawTx;
|
|
1651
1672
|
revokeRole(role: string, address: Address): RawTx;
|
|
1652
1673
|
setEmergencyAdmin(newEmergencyAdmin: Address): RawTx;
|
|
@@ -1667,6 +1688,14 @@ export declare class MarketConfiguratorContract extends BaseContract<typeof abi>
|
|
|
1667
1688
|
emergencyConfigureCreditSuite(creditManager: Address, calldata: Hex): RawTx;
|
|
1668
1689
|
emergencyConfigurePriceOracle(pool: Address, calldata: Hex): RawTx;
|
|
1669
1690
|
emergencyConfigureLossPolicy(pool: Address, calldata: Hex): RawTx;
|
|
1691
|
+
/**
|
|
1692
|
+
* Note: current interest rate model factory forbids all emergency configuration calls
|
|
1693
|
+
*/
|
|
1694
|
+
emergencyConfigureInterestRateModel(pool: Address, calldata: Hex): RawTx;
|
|
1695
|
+
/**
|
|
1696
|
+
* Note: current rate keeper factory forbids all emergency configuration calls
|
|
1697
|
+
*/
|
|
1698
|
+
emergencyConfigureRateKeeper(pool: Address, calldata: Hex): RawTx;
|
|
1670
1699
|
}
|
|
1671
1700
|
//#endregion
|
|
1672
1701
|
export {};
|
|
@@ -66,4 +66,31 @@ export declare enum AccessMode {
|
|
|
66
66
|
Forbidden = 2
|
|
67
67
|
}
|
|
68
68
|
export type PeripheryDomain = "ZAPPER" | "DEGEN_NFT";
|
|
69
|
+
/**
|
|
70
|
+
* Emergency admin of a market configurator, as seen by the SDK
|
|
71
|
+
* - `direct`: emergency admin is an EOA or Safe that calls the market configurator itself
|
|
72
|
+
* - `killSwitch`: emergency admin is a `KILL_SWITCH_PROXY`, `caller` executes emergency calls
|
|
73
|
+
* via `proxyCall` until `owner` kills the proxy
|
|
74
|
+
*/
|
|
75
|
+
export type EmergencyAdmin = {
|
|
76
|
+
type: "direct";
|
|
77
|
+
address: Address;
|
|
78
|
+
/**
|
|
79
|
+
* Address that must send emergency transactions
|
|
80
|
+
*/
|
|
81
|
+
executor: Address;
|
|
82
|
+
} | {
|
|
83
|
+
type: "killSwitch";
|
|
84
|
+
/**
|
|
85
|
+
* Address of the kill switch proxy
|
|
86
|
+
*/
|
|
87
|
+
address: Address;
|
|
88
|
+
caller: Address;
|
|
89
|
+
owner: Address;
|
|
90
|
+
isKilled: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Address that must send emergency transactions, i.e. proxy caller
|
|
93
|
+
*/
|
|
94
|
+
executor: Address;
|
|
95
|
+
};
|
|
69
96
|
//#endregion
|
|
@@ -13,12 +13,12 @@ import "./core/index.js";
|
|
|
13
13
|
import { FunctionParams, ValueParams, encodeFunctionParams } from "./utils/abi-encoder.js";
|
|
14
14
|
import { DeployArgs, DeployContractArgs, DeployPriceFeedArgs, PreparedDeployment, PreparedPriceFeedDeployment } from "./api/deploy/types.js";
|
|
15
15
|
import { DEFAULT_DEPLOY_SALT, PermissionlessDeploy, priceFeedSalt } from "./api/deploy/PermissionlessDeploy.js";
|
|
16
|
-
import { AssetScore, AssetScoresArgs, MarketScore, ScoredFeed } from "./api/oracles/score/types.js";
|
|
16
|
+
import { AssetScore, AssetScoresArgs, GroupImpact, MarketScore, ScoredFeed } from "./api/oracles/score/types.js";
|
|
17
17
|
import { BreakingPoint, FeedOutcome, GroupReport, GroupScenarioOutcome, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs } from "./api/oracles/stress/types.js";
|
|
18
18
|
import { AssetArgs, AssetCap, AssetsArgs, FeedCap, MarketCap, PermissionlessAsset, PermissionlessAssetDetails, PermissionlessAssetMarket, PermissionlessAssetMarketFeed, PermissionlessAssetQuota, PermissionlessAssetSummary, PermissionlessIndexedAssetDetails, PermissionlessIndexedAssetSummary, PermissionlessIndexedPriceFeedDetails, PermissionlessIndexedPriceFeedMarket, PermissionlessMarket, PermissionlessMarketSlot, PermissionlessPriceFeedAsset, PermissionlessPriceFeedDetails, PermissionlessPriceFeedMarket, PermissionlessPriceFeedStore, PermissionlessQuotaTotals, PriceFeedArgs, PriceFeedDecimals, PriceFeedPrice, PriceFeedRef } from "./api/oracles/types.js";
|
|
19
19
|
import { GET_PRICES_CHUNK_SIZE, GET_PRICES_GAS_LIMIT_BY_CHAIN_ID, PermissionlessOracles } from "./api/oracles/PermissionlessOracles.js";
|
|
20
20
|
import { AddressProviderContract } from "./bindings/address-provider.js";
|
|
21
|
-
import { BytecodeRepositoryContract } from "./bindings/bytecode-repository.js";
|
|
21
|
+
import { BytecodeRepositoryContract, ComputeAddressArgs } from "./bindings/bytecode-repository.js";
|
|
22
22
|
import { TokenCompressorContract } from "./bindings/compressors/token-compressor.js";
|
|
23
23
|
import { WithdrawalCompressorContract } from "./bindings/compressors/withdrawal-compressor.js";
|
|
24
24
|
import { ConstructorParams, CrossChainMultisigContract, Proposal } from "./bindings/cross-chain-multisig.js";
|
|
@@ -26,7 +26,8 @@ import { QueuedAndExecutedTransaction, SafeBatch, SafeMeta, SafeTx, TimelockTran
|
|
|
26
26
|
import { GovernorContract } from "./bindings/governance/governor.js";
|
|
27
27
|
import { TimeLockContract } from "./bindings/governance/timelock.js";
|
|
28
28
|
import { InstanceManagerContract } from "./bindings/instance-manager.js";
|
|
29
|
-
import {
|
|
29
|
+
import { KILL_SWITCH_PROXY_MINOR_VERSION, KillSwitchProxyContract, KillSwitchProxyNotAllowedError, PreparedKillSwitchProxyDeployment, killSwitchProxySalt } from "./bindings/kill-switch-proxy.js";
|
|
30
|
+
import { AccessMode, AddAssetParams, AllowTokenParams, CreditManagerFees, DeployParams, EmergencyAdmin, ForbidAdapterParams, ForbidTokenParams, Market, PauseCreditManagerParams, PeripheryDomain, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, UnpauseCreditManagerParams } from "./bindings/types.js";
|
|
30
31
|
import { MarketConfiguratorContract } from "./bindings/market-configurator.js";
|
|
31
32
|
import { MarketConfiguratorFactoryContract } from "./bindings/market-configurator-factory.js";
|
|
32
33
|
import { PriceFeedStoreContract } from "./bindings/price-feed-store.js";
|
|
@@ -40,11 +41,11 @@ import { InstanceOwnerTransactions } from "./api/transactions/InstanceOwnerTrans
|
|
|
40
41
|
import { GearboxPermissionless } from "./api/GearboxPermissionless.js";
|
|
41
42
|
import { deriveEffectiveStalenessPeriod } from "./api/deploy/effective-staleness.js";
|
|
42
43
|
import { PermissionlessChainUnreachableError, PermissionlessNotAttachedError, PriceFeedNotInStoreError, PriceFeedSaltMissingError, PriceFeedStalenessUnknownError } from "./api/errors.js";
|
|
43
|
-
import {
|
|
44
|
+
import { REVERT_SCORE, SCORE_MULTIPLIER, factorOf, finalPrice, scoreOfFactor, worstOf } from "./api/oracles/score/formula.js";
|
|
44
45
|
import { runAssetScores } from "./api/oracles/score/run.js";
|
|
45
46
|
import { TreeNode, classifySources, sourcesByFeed } from "./api/oracles/stress/classify.js";
|
|
46
47
|
import { UNBOUNDED_DOWN, UNBOUNDED_UP, groupOverride, perturb, rateStub, roundDataStub } from "./api/oracles/stress/override.js";
|
|
47
|
-
import { DEFAULT_SCENARIOS, RATE_FEED_TYPE, readForest, readRateTargets, runStressTest } from "./api/oracles/stress/run.js";
|
|
48
|
+
import { DEFAULT_SCENARIOS, RATE_FEED_TYPE, readForest, readRateTargets, readUnder, runStressTest } from "./api/oracles/stress/run.js";
|
|
48
49
|
import { scoreGroup, slotHarm, verdictOf } from "./api/oracles/stress/score.js";
|
|
49
50
|
import "./api/index.js";
|
|
50
51
|
import { ArchiveTransport, ArchiveTransportConfig } from "./chains/archive-transport.js";
|
|
@@ -56,10 +57,10 @@ import { PUBLIC_CREATE2_FACTORY, checkCreate2Deployment, checkCreate2DeploymentA
|
|
|
56
57
|
import { convertPercent, deepJsonParse, formatBytecodeSize, formatBytecodeVersion, shortenHash, significantTrunc } from "./utils/format.js";
|
|
57
58
|
import { calculateChecksum, convertRawTxToSafeMultisigTx, getSafeBatch, getSafeBatches } from "./utils/governance/batch.js";
|
|
58
59
|
import { convertQueueBatchToExecuteTx } from "./utils/governance/timelock-txs.js";
|
|
59
|
-
import { BYTECODE_REPOSITORY, CROSS_CHAIN_GOVERNANCE, CROSS_CHAIN_MULTISIG, INSTANCE_MANAGER, MARKET_CONFIGURATOR_FACTORY, PRICE_FEED_STORE, TOKEN_COMPRESSOR } from "./utils/literals.js";
|
|
60
|
+
import { BYTECODE_REPOSITORY, CROSS_CHAIN_GOVERNANCE, CROSS_CHAIN_MULTISIG, INSTANCE_MANAGER, KILL_SWITCH_PROXY, MARKET_CONFIGURATOR_FACTORY, PRICE_FEED_STORE, TOKEN_COMPRESSOR } from "./utils/literals.js";
|
|
60
61
|
import { getPriceUpdateTx } from "./utils/price-update/get-price-update-tx.js";
|
|
61
62
|
import { getFeedDecimals, getLatestPrices, getPrices } from "./utils/price-update/get-prices.js";
|
|
62
63
|
import { GetUpdatablePriceFeedsArgs, getUpdatablePriceFeeds } from "./utils/price-update/get-updatable-feeds.js";
|
|
63
64
|
import { normalizeSignature } from "./utils/signature.js";
|
|
64
65
|
import "./utils/index.js";
|
|
65
|
-
export { AccessMode, AddAssetParams, AddFeedsArgs, AddressProviderContract, Addresses, AllowTokenParams, ArchiveTransport, ArchiveTransportConfig, AssetArgs, AssetCap, AssetScore, AssetScoresArgs, AssetsArgs, AttachChainsArgs, AuditEvent, Auditor,
|
|
66
|
+
export { AccessMode, AddAssetParams, AddFeedsArgs, AddressProviderContract, Addresses, AllowTokenParams, ArchiveTransport, ArchiveTransportConfig, AssetArgs, AssetCap, AssetScore, AssetScoresArgs, AssetsArgs, AttachChainsArgs, AuditEvent, Auditor, BYTECODE_REPOSITORY, Batch, BreakingPoint, Bytecode, BytecodeRepositoryContract, CCMConstructorParams, CROSS_CHAIN_GOVERNANCE, CROSS_CHAIN_MULTISIG, ChainScope, ChainSummaryArgs, ChainsNamespace, ChangeNamesArgs, ChangeStalenessPeriodsArgs, ComputeAddressArgs, ConstructorParams, CreditManagerFees, CrossChainCall, CrossChainMultisigContract, DEFAULT_DEPLOY_SALT, DEFAULT_SCENARIOS, DeployArgs, DeployContractArgs, DeployParams, DeployPriceFeedArgs, Deployment, DeploymentExtended, EmergencyAdmin, FeedCap, FeedOutcome, ForbidAdapterParams, ForbidFeedsArgs, ForbidTokenParams, FunctionParams, GET_PRICES_CHUNK_SIZE, GET_PRICES_GAS_LIMIT_BY_CHAIN_ID, GearboxPermissionless, GearboxPermissionlessOptions, GetUpdatablePriceFeedsArgs, GovernorContract, GroupImpact, GroupReport, GroupScenarioOutcome, INSTANCE_MANAGER, InputValueParams, InstanceManagerContract, InstanceOwnerTransactions, InstanceTxs, InstanceTxsArgs, KILL_SWITCH_PROXY, KILL_SWITCH_PROXY_MINOR_VERSION, KillSwitchProxyContract, KillSwitchProxyNotAllowedError, MAINNET_CCM_CONSTRUCTOR_PARAMS, MAINNET_DEPLOYMENT_BLOCK, MAINNET_DEPLOYMENT_CCM_SALT, MAINNET_DEPLOYMENT_IM_SALT, MARKET_CONFIGURATOR_FACTORY, Market, MarketCap, MarketConfiguratorContract, MarketConfiguratorFactoryContract, MarketScore, PRICE_FEED_STORE, PUBLIC_CREATE2_FACTORY, PauseCreditManagerParams, PeripheryDomain, PermissionlessAnalytics, PermissionlessAsset, PermissionlessAssetDetails, PermissionlessAssetMarket, PermissionlessAssetMarketFeed, PermissionlessAssetQuota, PermissionlessAssetSummary, PermissionlessChain, PermissionlessChainSummary, PermissionlessChainUnreachableError, PermissionlessDeploy, PermissionlessIndexedAssetDetails, PermissionlessIndexedAssetSummary, PermissionlessIndexedPriceFeedDetails, PermissionlessIndexedPriceFeedMarket, PermissionlessMarket, PermissionlessMarketSlot, PermissionlessNotAttachedError, PermissionlessOracles, PermissionlessPriceFeedAsset, PermissionlessPriceFeedDetails, PermissionlessPriceFeedMarket, PermissionlessPriceFeedStore, PermissionlessQuotaTotals, PreparedDeployment, PreparedKillSwitchProxyDeployment, PreparedPriceFeedDeployment, PriceChartArgs, PriceFeed, PriceFeedArgs, PriceFeedChartPoint, PriceFeedConstructorParam, PriceFeedDecimals, PriceFeedNotInStoreError, PriceFeedPair, PriceFeedParamType, PriceFeedParams, PriceFeedPrice, PriceFeedPriceChart, PriceFeedRef, PriceFeedSaltMissingError, PriceFeedSetupParams, PriceFeedStalenessUnknownError, PriceFeedStoreContract, Proposal, QueuedAndExecutedTransaction, RATE_FEED_TYPE, REVERT_SCORE, RecoveryMessage, RoutingManagerContract, SCORE_MULTIPLIER, SafeBatch, SafeMeta, SafeTx, ScoredFeed, SetExpirationDateParams, SetFeesParams, SetPriceFeedParams, SetReservePriceFeedParams, SetTokenQuotaIncreaseFeeParams, Signature, SlotOutcome, StressReport, StressScenario, StressSource, StressSourceKind, StressTestArgs, TOKEN_COMPRESSOR, TimeLockContract, TimelockTransaction, TimelockTxParams, TimelockTxs, TokenCompressorContract, TreasurySplitterContract, TreeNode, UNBOUNDED_DOWN, UNBOUNDED_UP, UnpauseCreditManagerParams, ValueParams, WithdrawalCompressorContract, calculateChecksum, checkCreate2Deployment, checkCreate2DeploymentAddress, chunkedLogsTransport, classifySources, convertPercent, convertQueueBatchToExecuteTx, convertRawTxToSafeMultisigTx, createCallData, createCreate2DeployRawTx, deepJsonParse, deployUsingPublicCreate2, deriveEffectiveStalenessPeriod, encodeFunctionParams, factorOf, finalPrice, formatBytecodeSize, formatBytecodeVersion, getBlockNumberByTimestamp, getCreate2AddressPublicFactory, getCreate2DeploymentAddress, getFeedDecimals, getLatestPrices, getPriceUpdateTx, getPrices, getSafeBatch, getSafeBatches, getUpdatablePriceFeeds, groupOverride, handleSalt, killSwitchProxySalt, normalizeSignature, perturb, priceFeedSalt, priceFeedSetupParams, rateStub, readForest, readRateTargets, readUnder, roundDataStub, runAssetScores, runStressTest, scoreGroup, scoreOfFactor, shortenHash, significantTrunc, slotHarm, sourcesByFeed, verdictOf, worstOf };
|
|
@@ -6,10 +6,10 @@ import { convertPercent, deepJsonParse, formatBytecodeSize, formatBytecodeVersio
|
|
|
6
6
|
import { calculateChecksum, convertRawTxToSafeMultisigTx, getSafeBatch, getSafeBatches } from "./governance/batch.js";
|
|
7
7
|
import { convertQueueBatchToExecuteTx } from "./governance/timelock-txs.js";
|
|
8
8
|
import "./governance/index.js";
|
|
9
|
-
import { BYTECODE_REPOSITORY, CROSS_CHAIN_GOVERNANCE, CROSS_CHAIN_MULTISIG, INSTANCE_MANAGER, MARKET_CONFIGURATOR_FACTORY, PRICE_FEED_STORE, TOKEN_COMPRESSOR } from "./literals.js";
|
|
9
|
+
import { BYTECODE_REPOSITORY, CROSS_CHAIN_GOVERNANCE, CROSS_CHAIN_MULTISIG, INSTANCE_MANAGER, KILL_SWITCH_PROXY, MARKET_CONFIGURATOR_FACTORY, PRICE_FEED_STORE, TOKEN_COMPRESSOR } from "./literals.js";
|
|
10
10
|
import { getPriceUpdateTx } from "./price-update/get-price-update-tx.js";
|
|
11
11
|
import { getFeedDecimals, getLatestPrices, getPrices } from "./price-update/get-prices.js";
|
|
12
12
|
import { GetUpdatablePriceFeedsArgs, getUpdatablePriceFeeds } from "./price-update/get-updatable-feeds.js";
|
|
13
13
|
import "./price-update/index.js";
|
|
14
14
|
import { normalizeSignature } from "./signature.js";
|
|
15
|
-
export { BYTECODE_REPOSITORY, CROSS_CHAIN_GOVERNANCE, CROSS_CHAIN_MULTISIG, FunctionParams, GetUpdatablePriceFeedsArgs, INSTANCE_MANAGER, InstanceTxs, MARKET_CONFIGURATOR_FACTORY, PRICE_FEED_STORE, PUBLIC_CREATE2_FACTORY, TOKEN_COMPRESSOR, TimelockTxs, ValueParams, calculateChecksum, checkCreate2Deployment, checkCreate2DeploymentAddress, convertPercent, convertQueueBatchToExecuteTx, convertRawTxToSafeMultisigTx, createCreate2DeployRawTx, deepJsonParse, deployUsingPublicCreate2, encodeFunctionParams, formatBytecodeSize, formatBytecodeVersion, getBlockNumberByTimestamp, getCreate2AddressPublicFactory, getCreate2DeploymentAddress, getFeedDecimals, getLatestPrices, getPriceUpdateTx, getPrices, getSafeBatch, getSafeBatches, getUpdatablePriceFeeds, handleSalt, normalizeSignature, shortenHash, significantTrunc };
|
|
15
|
+
export { BYTECODE_REPOSITORY, CROSS_CHAIN_GOVERNANCE, CROSS_CHAIN_MULTISIG, FunctionParams, GetUpdatablePriceFeedsArgs, INSTANCE_MANAGER, InstanceTxs, KILL_SWITCH_PROXY, MARKET_CONFIGURATOR_FACTORY, PRICE_FEED_STORE, PUBLIC_CREATE2_FACTORY, TOKEN_COMPRESSOR, TimelockTxs, ValueParams, calculateChecksum, checkCreate2Deployment, checkCreate2DeploymentAddress, convertPercent, convertQueueBatchToExecuteTx, convertRawTxToSafeMultisigTx, createCreate2DeployRawTx, deepJsonParse, deployUsingPublicCreate2, encodeFunctionParams, formatBytecodeSize, formatBytecodeVersion, getBlockNumberByTimestamp, getCreate2AddressPublicFactory, getCreate2DeploymentAddress, getFeedDecimals, getLatestPrices, getPriceUpdateTx, getPrices, getSafeBatch, getSafeBatches, getUpdatablePriceFeeds, handleSalt, normalizeSignature, shortenHash, significantTrunc };
|
|
@@ -6,4 +6,5 @@ export declare const TOKEN_COMPRESSOR = "GLOBAL::TOKEN_COMPRESSOR";
|
|
|
6
6
|
export declare const CROSS_CHAIN_MULTISIG = "CROSS_CHAIN_MULTISIG";
|
|
7
7
|
export declare const PRICE_FEED_STORE = "PRICE_FEED_STORE";
|
|
8
8
|
export declare const MARKET_CONFIGURATOR_FACTORY = "MARKET_CONFIGURATOR_FACTORY";
|
|
9
|
+
export declare const KILL_SWITCH_PROXY = "KILL_SWITCH_PROXY";
|
|
9
10
|
//#endregion
|