@enzymefinance/testutils 4.0.0-next.0 → 4.0.0-next.5
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/CHANGELOG.md +33 -0
- package/dist/declarations/src/assertions.d.ts +4 -4
- package/dist/declarations/src/deployment.d.ts +181 -82
- package/dist/declarations/src/gasRelayer.d.ts +56 -54
- package/dist/declarations/src/helpers.d.ts +16 -15
- package/dist/declarations/src/index.d.ts +6 -6
- package/dist/declarations/src/scaffolding/assets.d.ts +10 -10
- package/dist/declarations/src/scaffolding/chainlink.d.ts +3 -3
- package/dist/declarations/src/scaffolding/common.d.ts +7 -7
- package/dist/declarations/src/scaffolding/core.d.ts +17 -16
- package/dist/declarations/src/scaffolding/extensions/common.d.ts +11 -11
- package/dist/declarations/src/scaffolding/extensions/external-positions/actions.d.ts +35 -0
- package/dist/declarations/src/scaffolding/extensions/external-positions/compound.d.ts +56 -59
- package/dist/declarations/src/scaffolding/extensions/external-positions/index.d.ts +4 -2
- package/dist/declarations/src/scaffolding/extensions/external-positions/mocks.d.ts +53 -20
- package/dist/declarations/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.d.ts +99 -0
- package/dist/declarations/src/scaffolding/extensions/fees.d.ts +12 -12
- package/dist/declarations/src/scaffolding/extensions/index.d.ts +5 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/aave.d.ts +20 -19
- package/dist/declarations/src/scaffolding/extensions/integrations/compound.d.ts +28 -28
- package/dist/declarations/src/scaffolding/extensions/integrations/curve.d.ts +272 -271
- package/dist/declarations/src/scaffolding/extensions/integrations/idle.d.ts +28 -28
- package/dist/declarations/src/scaffolding/extensions/integrations/index.d.ts +14 -12
- package/dist/declarations/src/scaffolding/extensions/integrations/mock.d.ts +32 -32
- package/dist/declarations/src/scaffolding/extensions/integrations/paraSwapV4.d.ts +23 -22
- package/dist/declarations/src/scaffolding/extensions/integrations/paraSwapV5.d.ts +23 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/poolTogetherV4.d.ts +29 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/synthetix.d.ts +33 -25
- package/dist/declarations/src/scaffolding/extensions/integrations/trackedAssets.d.ts +15 -15
- package/dist/declarations/src/scaffolding/extensions/integrations/uniswapV2.d.ts +46 -46
- package/dist/declarations/src/scaffolding/extensions/integrations/uniswapV3.d.ts +15 -15
- package/dist/declarations/src/scaffolding/extensions/integrations/yearn.d.ts +22 -22
- package/dist/declarations/src/scaffolding/extensions/integrations/zeroExV2.d.ts +12 -12
- package/dist/declarations/src/scaffolding/extensions/policies.d.ts +17 -17
- package/dist/declarations/src/scaffolding/index.d.ts +8 -8
- package/dist/declarations/src/scaffolding/setup.d.ts +77 -75
- package/dist/declarations/src/scaffolding/shares.d.ts +35 -35
- package/dist/declarations/src/scaffolding/vaultCalls.d.ts +32 -17
- package/dist/declarations/src/whales.d.ts +42 -44
- package/dist/enzymefinance-testutils.browser.cjs.js +1470 -697
- package/dist/enzymefinance-testutils.browser.esm.js +1257 -508
- package/dist/enzymefinance-testutils.cjs.dev.js +1470 -697
- package/dist/enzymefinance-testutils.cjs.prod.js +1470 -697
- package/dist/enzymefinance-testutils.esm.js +1257 -508
- package/package.json +6 -6
- package/src/assertions.ts +5 -2
- package/src/deployment.ts +202 -99
- package/src/gasRelayer.ts +17 -18
- package/src/helpers.ts +6 -4
- package/src/scaffolding/assets.ts +6 -5
- package/src/scaffolding/chainlink.ts +2 -2
- package/src/scaffolding/common.ts +1 -1
- package/src/scaffolding/core.ts +28 -12
- package/src/scaffolding/extensions/common.ts +4 -4
- package/src/scaffolding/extensions/external-positions/actions.ts +103 -0
- package/src/scaffolding/extensions/external-positions/compound.ts +69 -114
- package/src/scaffolding/extensions/external-positions/index.ts +2 -0
- package/src/scaffolding/extensions/external-positions/mocks.ts +132 -10
- package/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.ts +290 -0
- package/src/scaffolding/extensions/fees.ts +1 -1
- package/src/scaffolding/extensions/integrations/aave.ts +6 -8
- package/src/scaffolding/extensions/integrations/compound.ts +10 -11
- package/src/scaffolding/extensions/integrations/curve.ts +72 -68
- package/src/scaffolding/extensions/integrations/idle.ts +9 -11
- package/src/scaffolding/extensions/integrations/index.ts +2 -0
- package/src/scaffolding/extensions/integrations/mock.ts +11 -13
- package/src/scaffolding/extensions/integrations/paraSwapV4.ts +16 -11
- package/src/scaffolding/extensions/integrations/paraSwapV5.ts +73 -0
- package/src/scaffolding/extensions/integrations/poolTogetherV4.ts +117 -0
- package/src/scaffolding/extensions/integrations/synthetix.ts +45 -12
- package/src/scaffolding/extensions/integrations/trackedAssets.ts +3 -4
- package/src/scaffolding/extensions/integrations/uniswapV2.ts +31 -27
- package/src/scaffolding/extensions/integrations/uniswapV3.ts +9 -10
- package/src/scaffolding/extensions/integrations/yearn.ts +9 -11
- package/src/scaffolding/extensions/integrations/zeroExV2.ts +9 -7
- package/src/scaffolding/extensions/policies.ts +2 -1
- package/src/scaffolding/setup.ts +27 -19
- package/src/scaffolding/shares.ts +5 -4
- package/src/scaffolding/vaultCalls.ts +50 -3
- package/src/whales.ts +26 -17
- package/tsconfig.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
# @enzymefinance/testutils
|
|
2
2
|
|
|
3
|
+
## 4.0.0-next.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8b844ad4: Publish with call signatures.
|
|
8
|
+
- Updated dependencies [8b844ad4]
|
|
9
|
+
- @enzymefinance/protocol@4.0.0-next.5
|
|
10
|
+
|
|
11
|
+
## 4.0.0-next.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 90955319: Publishing new adapters
|
|
16
|
+
- Updated dependencies [90955319]
|
|
17
|
+
- @enzymefinance/protocol@4.0.0-next.3
|
|
18
|
+
|
|
19
|
+
## 4.0.0-next.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- a0b65d53: Publishing post-audit packages.
|
|
24
|
+
- Updated dependencies [a0b65d53]
|
|
25
|
+
- @enzymefinance/protocol@4.0.0-next.2
|
|
26
|
+
|
|
27
|
+
## 4.0.0-next.1
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- a18335ad: Upgrade dependencies and including new policies.
|
|
32
|
+
- Updated dependencies [a18335ad]
|
|
33
|
+
- @enzymefinance/protocol@4.0.0-next.1
|
|
34
|
+
|
|
3
35
|
## 4.0.0-next.0
|
|
36
|
+
|
|
4
37
|
### Major Changes
|
|
5
38
|
|
|
6
39
|
- 3a27d558: Entering pre-release phase for Sulu
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
-
import { utils } from 'ethers';
|
|
3
|
-
export declare function assertEvent<TResult = any>(receipt: ContractReceipt<any>, event: string | utils.EventFragment, match?: TResult): NonNullable<TResult>;
|
|
4
|
-
export declare function assertNoEvent(receipt: ContractReceipt<any>, event: string | utils.EventFragment): void;
|
|
1
|
+
import type { ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
+
import type { utils } from 'ethers';
|
|
3
|
+
export declare function assertEvent<TResult = any>(receipt: ContractReceipt<any>, event: string | utils.EventFragment, match?: TResult): NonNullable<TResult>;
|
|
4
|
+
export declare function assertNoEvent(receipt: ContractReceipt<any>, event: string | utils.EventFragment): void;
|
|
@@ -1,82 +1,181 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly
|
|
9
|
-
|
|
10
|
-
readonly
|
|
11
|
-
readonly
|
|
12
|
-
readonly
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export declare
|
|
82
|
-
|
|
1
|
+
import { AaveAdapter, AavePriceFeed, AddressListRegistry, AllowedAdapterIncomingAssetsPolicy, AllowedAdaptersPolicy, AllowedAssetsForRedemptionPolicy, AllowedDepositRecipientsPolicy, AllowedExternalPositionTypesPolicy, AllowedSharesTransferRecipientsPolicy, AssetFinalityResolver, CompoundAdapter, CompoundDebtPositionLib, CompoundDebtPositionParser, CompoundPriceFeed, ComptrollerLib, CumulativeSlippageTolerancePolicy, CurveExchangeAdapter, CurveLiquidityAaveAdapter, CurveLiquidityEursAdapter, CurveLiquiditySethAdapter, CurveLiquidityStethAdapter, CurvePriceFeed, DepositWrapper, Dispatcher, EntranceRateBurnFee, EntranceRateDirectFee, ExitRateBurnFee, ExitRateDirectFee, ExternalPositionFactory, ExternalPositionManager, FeeManager, FundDeployer, FundValueCalculator, FundValueCalculatorRouter, FundValueCalculatorUsdWrapper, GasRelayPaymasterFactory, GuaranteedRedemptionPolicy, IdleAdapter, IdlePriceFeed, IntegrationManager, LidoStethPriceFeed, ManagementFee, MinAssetBalancesPostRedemptionPolicy, MinMaxInvestmentPolicy, OnlyRemoveDustExternalPositionPolicy, OnlyUntrackDustOrPricelessAssetsPolicy, ParaSwapV4Adapter, ParaSwapV5Adapter, PerformanceFee, PolicyManager, PoolTogetherV4Adapter, PoolTogetherV4PriceFeed, ProtocolFeeReserveLib, ProtocolFeeTracker, RevertingPriceFeed, StakehoundEthPriceFeed, SynthetixAdapter, SynthetixPriceFeed, UniswapV2ExchangeAdapter, UniswapV2LiquidityAdapter, UniswapV2PoolPriceFeed, UniswapV3Adapter, UnpermissionedActionsWrapper, ValueInterpreter, VaultLib, YearnVaultV2Adapter, YearnVaultV2PriceFeed, ZeroExV2Adapter } from '@enzymefinance/protocol';
|
|
2
|
+
export declare function getNamedSigner(name: string): Promise<import("@enzymefinance/hardhat").SignerWithAddress>;
|
|
3
|
+
export declare function getUnnamedSigners(): Promise<import("@enzymefinance/hardhat").SignerWithAddress[]>;
|
|
4
|
+
export declare function deployProtocolFixture(): Promise<{
|
|
5
|
+
readonly accounts: import("@enzymefinance/hardhat").SignerWithAddress[];
|
|
6
|
+
readonly config: DeploymentConfig;
|
|
7
|
+
readonly deployer: import("@enzymefinance/hardhat").SignerWithAddress;
|
|
8
|
+
readonly deployment: {
|
|
9
|
+
readonly aaveAdapter: AaveAdapter;
|
|
10
|
+
readonly aavePriceFeed: AavePriceFeed;
|
|
11
|
+
readonly addressListRegistry: AddressListRegistry;
|
|
12
|
+
readonly allowedAdapterIncomingAssetsPolicy: AllowedAdapterIncomingAssetsPolicy;
|
|
13
|
+
readonly allowedAdaptersPolicy: AllowedAdaptersPolicy;
|
|
14
|
+
readonly allowedAssetsForRedemptionPolicy: AllowedAssetsForRedemptionPolicy;
|
|
15
|
+
readonly allowedDepositRecipientsPolicy: AllowedDepositRecipientsPolicy;
|
|
16
|
+
readonly allowedExternalPositionTypesPolicy: AllowedExternalPositionTypesPolicy;
|
|
17
|
+
readonly allowedSharesTransferRecipientsPolicy: AllowedSharesTransferRecipientsPolicy;
|
|
18
|
+
readonly assetFinalityResolver: AssetFinalityResolver;
|
|
19
|
+
readonly compoundAdapter: CompoundAdapter;
|
|
20
|
+
readonly compoundDebtPositionLib: CompoundDebtPositionLib;
|
|
21
|
+
readonly compoundDebtPositionParser: CompoundDebtPositionParser;
|
|
22
|
+
readonly compoundPriceFeed: CompoundPriceFeed;
|
|
23
|
+
readonly comptrollerLib: ComptrollerLib;
|
|
24
|
+
readonly cumulativeSlippageTolerancePolicy: CumulativeSlippageTolerancePolicy;
|
|
25
|
+
readonly curveExchangeAdapter: CurveExchangeAdapter;
|
|
26
|
+
readonly curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
|
27
|
+
readonly curveLiquidityEursAdapter: CurveLiquidityEursAdapter;
|
|
28
|
+
readonly curveLiquiditySethAdapter: CurveLiquiditySethAdapter;
|
|
29
|
+
readonly curveLiquidityStethAdapter: CurveLiquidityStethAdapter;
|
|
30
|
+
readonly curvePriceFeed: CurvePriceFeed;
|
|
31
|
+
readonly depositWrapper: DepositWrapper;
|
|
32
|
+
readonly dispatcher: Dispatcher;
|
|
33
|
+
readonly entranceRateBurnFee: EntranceRateBurnFee;
|
|
34
|
+
readonly entranceRateDirectFee: EntranceRateDirectFee;
|
|
35
|
+
readonly exitRateBurnFee: ExitRateBurnFee;
|
|
36
|
+
readonly exitRateDirectFee: ExitRateDirectFee;
|
|
37
|
+
readonly externalPositionFactory: ExternalPositionFactory;
|
|
38
|
+
readonly externalPositionManager: ExternalPositionManager;
|
|
39
|
+
readonly feeManager: FeeManager;
|
|
40
|
+
readonly fundDeployer: FundDeployer;
|
|
41
|
+
readonly fundValueCalculator: FundValueCalculator;
|
|
42
|
+
readonly fundValueCalculatorRouter: FundValueCalculatorRouter;
|
|
43
|
+
readonly fundValueCalculatorUsdWrapper: FundValueCalculatorUsdWrapper;
|
|
44
|
+
readonly gasRelayPaymasterFactory: GasRelayPaymasterFactory;
|
|
45
|
+
readonly guaranteedRedemptionPolicy: GuaranteedRedemptionPolicy;
|
|
46
|
+
readonly idleAdapter: IdleAdapter;
|
|
47
|
+
readonly idlePriceFeed: IdlePriceFeed;
|
|
48
|
+
readonly integrationManager: IntegrationManager;
|
|
49
|
+
readonly lidoStethPriceFeed: LidoStethPriceFeed;
|
|
50
|
+
readonly managementFee: ManagementFee;
|
|
51
|
+
readonly minAssetBalancesPostRedemptionPolicy: MinAssetBalancesPostRedemptionPolicy;
|
|
52
|
+
readonly minMaxInvestmentPolicy: MinMaxInvestmentPolicy;
|
|
53
|
+
readonly onlyRemoveDustExternalPositionPolicy: OnlyRemoveDustExternalPositionPolicy;
|
|
54
|
+
readonly onlyUntrackDustOrPricelessAssetsPolicy: OnlyUntrackDustOrPricelessAssetsPolicy;
|
|
55
|
+
readonly paraSwapV4Adapter: ParaSwapV4Adapter;
|
|
56
|
+
readonly paraSwapV5Adapter: ParaSwapV5Adapter;
|
|
57
|
+
readonly performanceFee: PerformanceFee;
|
|
58
|
+
readonly policyManager: PolicyManager;
|
|
59
|
+
readonly poolTogetherV4Adapter: PoolTogetherV4Adapter;
|
|
60
|
+
readonly poolTogetherV4PriceFeed: PoolTogetherV4PriceFeed;
|
|
61
|
+
readonly protocolFeeReserveLib: ProtocolFeeReserveLib;
|
|
62
|
+
readonly protocolFeeReserveProxy: ProtocolFeeReserveLib;
|
|
63
|
+
readonly protocolFeeTracker: ProtocolFeeTracker;
|
|
64
|
+
readonly revertingPriceFeed: RevertingPriceFeed;
|
|
65
|
+
readonly stakehoundEthPriceFeed: StakehoundEthPriceFeed;
|
|
66
|
+
readonly synthetixAdapter: SynthetixAdapter;
|
|
67
|
+
readonly synthetixPriceFeed: SynthetixPriceFeed;
|
|
68
|
+
readonly uniswapV2ExchangeAdapter: UniswapV2ExchangeAdapter;
|
|
69
|
+
readonly uniswapV2LiquidityAdapter: UniswapV2LiquidityAdapter;
|
|
70
|
+
readonly uniswapV2PoolPriceFeed: UniswapV2PoolPriceFeed;
|
|
71
|
+
readonly uniswapV3Adapter: UniswapV3Adapter;
|
|
72
|
+
readonly unpermissionedActionsWrapper: UnpermissionedActionsWrapper;
|
|
73
|
+
readonly valueInterpreter: ValueInterpreter;
|
|
74
|
+
readonly vaultLib: VaultLib;
|
|
75
|
+
readonly yearnVaultV2Adapter: YearnVaultV2Adapter;
|
|
76
|
+
readonly yearnVaultV2PriceFeed: YearnVaultV2PriceFeed;
|
|
77
|
+
readonly zeroExV2Adapter: ZeroExV2Adapter;
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
80
|
+
declare type Resolve<T extends () => any> = ReturnType<T> extends Promise<infer U> ? U : ReturnType<T>;
|
|
81
|
+
export declare type ProtocolDeployment = Resolve<typeof deployProtocolFixture>;
|
|
82
|
+
import type { ChainlinkRateAsset } from '@enzymefinance/protocol';
|
|
83
|
+
export interface DeploymentConfig {
|
|
84
|
+
feeToken: string;
|
|
85
|
+
weth: string;
|
|
86
|
+
wrappedNativeAsset: string;
|
|
87
|
+
primitives: Record<string, string>;
|
|
88
|
+
gsn: {
|
|
89
|
+
relayHub: string;
|
|
90
|
+
relayWorker: string;
|
|
91
|
+
trustedForwarder: string;
|
|
92
|
+
};
|
|
93
|
+
chainlink: {
|
|
94
|
+
ethusd: string;
|
|
95
|
+
aggregators: Record<string, readonly [string, ChainlinkRateAsset]>;
|
|
96
|
+
};
|
|
97
|
+
synthetix: {
|
|
98
|
+
snx: string;
|
|
99
|
+
susd: string;
|
|
100
|
+
synths: Record<string, string>;
|
|
101
|
+
addressResolver: string;
|
|
102
|
+
delegateApprovals: string;
|
|
103
|
+
originator: string;
|
|
104
|
+
redeemer: string;
|
|
105
|
+
trackingCode: string;
|
|
106
|
+
};
|
|
107
|
+
curve: {
|
|
108
|
+
addressProvider: string;
|
|
109
|
+
minter: string;
|
|
110
|
+
pools: Record<string, {
|
|
111
|
+
pool: string;
|
|
112
|
+
lpToken: string;
|
|
113
|
+
liquidityGaugeToken: string;
|
|
114
|
+
invariantProxyAsset: string;
|
|
115
|
+
}>;
|
|
116
|
+
};
|
|
117
|
+
aave: {
|
|
118
|
+
lendingPoolAddressProvider: string;
|
|
119
|
+
protocolDataProvider: string;
|
|
120
|
+
atokens: Record<string, [string, string]>;
|
|
121
|
+
};
|
|
122
|
+
compound: {
|
|
123
|
+
ceth: string;
|
|
124
|
+
comptroller: string;
|
|
125
|
+
ctokens: Record<string, string>;
|
|
126
|
+
};
|
|
127
|
+
idle: {
|
|
128
|
+
bestYieldIdleDai: string;
|
|
129
|
+
bestYieldIdleUsdc: string;
|
|
130
|
+
bestYieldIdleUsdt: string;
|
|
131
|
+
bestYieldIdleSusd: string;
|
|
132
|
+
bestYieldIdleTusd: string;
|
|
133
|
+
bestYieldIdleWbtc: string;
|
|
134
|
+
riskAdjustedIdleDai: string;
|
|
135
|
+
riskAdjustedIdleUsdc: string;
|
|
136
|
+
riskAdjustedIdleUsdt: string;
|
|
137
|
+
};
|
|
138
|
+
lido: {
|
|
139
|
+
steth: string;
|
|
140
|
+
};
|
|
141
|
+
paraSwapV4: {
|
|
142
|
+
augustusSwapper: string;
|
|
143
|
+
tokenTransferProxy: string;
|
|
144
|
+
};
|
|
145
|
+
paraSwapV5: {
|
|
146
|
+
augustusSwapper: string;
|
|
147
|
+
tokenTransferProxy: string;
|
|
148
|
+
};
|
|
149
|
+
poolTogetherV4: {
|
|
150
|
+
ptTokens: Record<string, [string, string]>;
|
|
151
|
+
};
|
|
152
|
+
stakehound: {
|
|
153
|
+
steth: string;
|
|
154
|
+
};
|
|
155
|
+
unsupportedAssets: Record<string, string>;
|
|
156
|
+
uniswap: {
|
|
157
|
+
factory: string;
|
|
158
|
+
router: string;
|
|
159
|
+
pools: Record<string, string>;
|
|
160
|
+
};
|
|
161
|
+
uniswapV3: {
|
|
162
|
+
router: string;
|
|
163
|
+
nonFungiblePositionManager: string;
|
|
164
|
+
};
|
|
165
|
+
yearn: {
|
|
166
|
+
vaultV2: {
|
|
167
|
+
registry: string;
|
|
168
|
+
yVaults: Record<string, string>;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
171
|
+
zeroex: {
|
|
172
|
+
exchange: string;
|
|
173
|
+
allowedMakers: string[];
|
|
174
|
+
};
|
|
175
|
+
policies: {
|
|
176
|
+
guaranteedRedemption: {
|
|
177
|
+
redemptionWindowBuffer: number;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
export {};
|
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { IGsnRelayHub
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
paymaster: any;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
export declare function
|
|
44
|
-
export declare function
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
from: any;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import type { ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
+
import type { CreateSignedRelayRequestOptions } from '@enzymefinance/protocol';
|
|
3
|
+
import { IGsnRelayHub } from '@enzymefinance/protocol';
|
|
4
|
+
import type { BigNumberish } from 'ethers';
|
|
5
|
+
import { utils } from 'ethers';
|
|
6
|
+
export interface RelayTransactionOptions extends CreateSignedRelayRequestOptions {
|
|
7
|
+
relayHub: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function relayTransaction(options: RelayTransactionOptions): Promise<ContractReceipt<import("@enzymefinance/ethers").SendFunction<[maxAcceptanceBudget: BigNumberish, relayRequest: {
|
|
10
|
+
request: {
|
|
11
|
+
from: import("@enzymefinance/ethers").AddressLike;
|
|
12
|
+
to: import("@enzymefinance/ethers").AddressLike;
|
|
13
|
+
value: BigNumberish;
|
|
14
|
+
gas: BigNumberish;
|
|
15
|
+
nonce: BigNumberish;
|
|
16
|
+
data: utils.BytesLike;
|
|
17
|
+
validUntil: BigNumberish;
|
|
18
|
+
};
|
|
19
|
+
relayData: {
|
|
20
|
+
gasPrice: BigNumberish;
|
|
21
|
+
pctRelayFee: BigNumberish;
|
|
22
|
+
baseRelayFee: BigNumberish;
|
|
23
|
+
relayWorker: import("@enzymefinance/ethers").AddressLike;
|
|
24
|
+
paymaster: import("@enzymefinance/ethers").AddressLike;
|
|
25
|
+
forwarder: import("@enzymefinance/ethers").AddressLike;
|
|
26
|
+
paymasterData: utils.BytesLike;
|
|
27
|
+
clientId: BigNumberish;
|
|
28
|
+
};
|
|
29
|
+
}, signature: utils.BytesLike, approvalData: utils.BytesLike, externalGasLimit: BigNumberish], {
|
|
30
|
+
paymasterAccepted: boolean;
|
|
31
|
+
returnValue: string;
|
|
32
|
+
}, IGsnRelayHub>>>;
|
|
33
|
+
export declare function assertDidRelay(receipt: ContractReceipt<any>): {
|
|
34
|
+
charge: any;
|
|
35
|
+
from: any;
|
|
36
|
+
paymaster: any;
|
|
37
|
+
relayManager: any;
|
|
38
|
+
relayWorker: any;
|
|
39
|
+
selector: any;
|
|
40
|
+
status: any;
|
|
41
|
+
to: any;
|
|
42
|
+
};
|
|
43
|
+
export declare function assertDidRelaySuccessfully(receipt: ContractReceipt<any>): void;
|
|
44
|
+
export declare function assertDidRelayWithError(receipt: ContractReceipt<any>): void;
|
|
45
|
+
export declare function assertDidRelayWithCharge(receipt: ContractReceipt<any>, amount: BigNumberish, tolerance?: BigNumberish): void;
|
|
46
|
+
export declare function assertPaymasterDidReject(receipt: ContractReceipt<any>): {
|
|
47
|
+
from: any;
|
|
48
|
+
innerGasUsed: any;
|
|
49
|
+
paymaster: any;
|
|
50
|
+
reason: any;
|
|
51
|
+
relayManager: any;
|
|
52
|
+
relayWorker: any;
|
|
53
|
+
selector: any;
|
|
54
|
+
to: any;
|
|
55
|
+
};
|
|
56
|
+
export declare function assertPaymasterDidRejectForReason(receipt: ContractReceipt<any>, reason: string): void;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { AddressLike, ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
mlnAmountToBurn: BigNumber;
|
|
15
|
-
|
|
1
|
+
import type { AddressLike, ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
+
import type { ValueInterpreter } from '@enzymefinance/protocol';
|
|
3
|
+
import type { BigNumberish } from 'ethers';
|
|
4
|
+
import { BigNumber } from 'ethers';
|
|
5
|
+
export declare function transactionTimestamp(receipt: ContractReceipt<any>): Promise<number>;
|
|
6
|
+
export declare function calcMlnValueAndBurnAmountForSharesBuyback({ valueInterpreter, mln, denominationAsset, sharesSupply, gav, buybackSharesAmount, }: {
|
|
7
|
+
valueInterpreter: ValueInterpreter;
|
|
8
|
+
mln: AddressLike;
|
|
9
|
+
denominationAsset: AddressLike;
|
|
10
|
+
sharesSupply: BigNumberish;
|
|
11
|
+
gav: BigNumberish;
|
|
12
|
+
buybackSharesAmount: BigNumberish;
|
|
13
|
+
}): Promise<{
|
|
14
|
+
mlnAmountToBurn: BigNumber;
|
|
15
|
+
mlnValue: BigNumber;
|
|
16
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './deployment';
|
|
2
|
-
export * from './scaffolding';
|
|
3
|
-
export * from './assertions';
|
|
4
|
-
export * from './helpers';
|
|
5
|
-
export * from './whales';
|
|
6
|
-
export * from './gasRelayer';
|
|
1
|
+
export * from './deployment';
|
|
2
|
+
export * from './scaffolding';
|
|
3
|
+
export * from './assertions';
|
|
4
|
+
export * from './helpers';
|
|
5
|
+
export * from './whales';
|
|
6
|
+
export * from './gasRelayer';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
2
|
-
import { ComptrollerLib, IntegrationManager, StandardToken } from '@enzymefinance/protocol';
|
|
3
|
-
import { BigNumberish } from 'ethers';
|
|
4
|
-
export declare function addNewAssetsToFund({ signer, comptrollerProxy, integrationManager, assets, amounts, }: {
|
|
5
|
-
signer: SignerWithAddress;
|
|
6
|
-
comptrollerProxy: ComptrollerLib;
|
|
7
|
-
integrationManager: IntegrationManager;
|
|
8
|
-
assets: StandardToken[];
|
|
9
|
-
amounts?: BigNumberish[];
|
|
10
|
-
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: import("@enzymefinance/ethers").AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
|
|
1
|
+
import type { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
2
|
+
import type { ComptrollerLib, IntegrationManager, StandardToken } from '@enzymefinance/protocol';
|
|
3
|
+
import type { BigNumberish } from 'ethers';
|
|
4
|
+
export declare function addNewAssetsToFund({ signer, comptrollerProxy, integrationManager, assets, amounts, }: {
|
|
5
|
+
signer: SignerWithAddress;
|
|
6
|
+
comptrollerProxy: ComptrollerLib;
|
|
7
|
+
integrationManager: IntegrationManager;
|
|
8
|
+
assets: StandardToken[];
|
|
9
|
+
amounts?: BigNumberish[];
|
|
10
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: import("@enzymefinance/ethers").AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare function updateChainlinkAggregator(aggregator: MockChainlinkPriceSource, price?: BigNumberish): Promise<void>;
|
|
1
|
+
import type { MockChainlinkPriceSource } from '@enzymefinance/protocol';
|
|
2
|
+
import type { BigNumberish } from 'ethers';
|
|
3
|
+
export declare function updateChainlinkAggregator(aggregator: MockChainlinkPriceSource, price?: BigNumberish): Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
-
import { StandardToken } from '@enzymefinance/protocol';
|
|
3
|
-
export declare function getAssetBalances({ account, assets }: {
|
|
4
|
-
account: AddressLike;
|
|
5
|
-
assets: AddressLike[];
|
|
6
|
-
}): Promise<import("ethers").BigNumber[]>;
|
|
7
|
-
export declare function getAssetUnit(asset: StandardToken): Promise<import("
|
|
1
|
+
import type { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
+
import { StandardToken } from '@enzymefinance/protocol';
|
|
3
|
+
export declare function getAssetBalances({ account, assets }: {
|
|
4
|
+
account: AddressLike;
|
|
5
|
+
assets: AddressLike[];
|
|
6
|
+
}): Promise<import("ethers").BigNumber[]>;
|
|
7
|
+
export declare function getAssetUnit(asset: StandardToken): Promise<import("ethers").BigNumber>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { AssetFinalityResolver,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import type { AssetFinalityResolver, Dispatcher, GasRelayPaymasterFactory, ValueInterpreter } from '@enzymefinance/protocol';
|
|
2
|
+
import { ExternalPositionManager, FeeManager, FundDeployer, IntegrationManager, PolicyManager, VaultLib } from '@enzymefinance/protocol';
|
|
3
|
+
import type { Signer } from 'ethers';
|
|
4
|
+
export declare function createFundDeployer({ deployer, assetFinalityResolver, externalPositionManager, dispatcher, gasRelayPaymasterFactory, valueInterpreter, vaultLib, setOnDispatcher, setReleaseLive, }: {
|
|
5
|
+
deployer: Signer;
|
|
6
|
+
assetFinalityResolver: AssetFinalityResolver;
|
|
7
|
+
externalPositionManager: ExternalPositionManager;
|
|
8
|
+
dispatcher: Dispatcher;
|
|
9
|
+
feeManager: FeeManager;
|
|
10
|
+
gasRelayPaymasterFactory: GasRelayPaymasterFactory;
|
|
11
|
+
integrationManager: IntegrationManager;
|
|
12
|
+
policyManager: PolicyManager;
|
|
13
|
+
valueInterpreter: ValueInterpreter;
|
|
14
|
+
vaultLib: VaultLib;
|
|
15
|
+
setOnDispatcher?: boolean;
|
|
16
|
+
setReleaseLive?: boolean;
|
|
17
|
+
}): Promise<FundDeployer>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
-
import { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
-
import { ComptrollerLib } from '@enzymefinance/protocol';
|
|
4
|
-
import { BigNumberish, BytesLike } from 'ethers';
|
|
5
|
-
export declare function callOnExtension({ comptrollerProxy, extension, actionId, callArgs, signer, }: {
|
|
6
|
-
comptrollerProxy: ComptrollerLib;
|
|
7
|
-
extension: AddressLike;
|
|
8
|
-
actionId: BigNumberish;
|
|
9
|
-
callArgs?: BytesLike;
|
|
10
|
-
signer?: SignerWithAddress;
|
|
11
|
-
}): Promise<any>;
|
|
1
|
+
import type { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
+
import type { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
+
import type { ComptrollerLib } from '@enzymefinance/protocol';
|
|
4
|
+
import type { BigNumberish, BytesLike } from 'ethers';
|
|
5
|
+
export declare function callOnExtension({ comptrollerProxy, extension, actionId, callArgs, signer, }: {
|
|
6
|
+
comptrollerProxy: ComptrollerLib;
|
|
7
|
+
extension: AddressLike;
|
|
8
|
+
actionId: BigNumberish;
|
|
9
|
+
callArgs?: BytesLike;
|
|
10
|
+
signer?: SignerWithAddress;
|
|
11
|
+
}): Promise<any>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
+
import type { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
+
import type { ComptrollerLib, ExternalPositionManager } from '@enzymefinance/protocol';
|
|
4
|
+
import { IExternalPositionProxy } from '@enzymefinance/protocol';
|
|
5
|
+
import type { BigNumberish, BytesLike } from 'ethers';
|
|
6
|
+
export declare function callOnExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, actionId, actionArgs, }: {
|
|
7
|
+
signer: SignerWithAddress;
|
|
8
|
+
comptrollerProxy: ComptrollerLib;
|
|
9
|
+
externalPositionManager: ExternalPositionManager;
|
|
10
|
+
externalPositionProxy: AddressLike;
|
|
11
|
+
actionId: BigNumberish;
|
|
12
|
+
actionArgs: BytesLike;
|
|
13
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: BytesLike], void, ComptrollerLib>>>;
|
|
14
|
+
export declare function createExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionTypeId, initializationData, }: {
|
|
15
|
+
signer: SignerWithAddress;
|
|
16
|
+
comptrollerProxy: ComptrollerLib;
|
|
17
|
+
externalPositionManager: ExternalPositionManager;
|
|
18
|
+
externalPositionTypeId: BigNumberish;
|
|
19
|
+
initializationData?: BytesLike;
|
|
20
|
+
}): Promise<{
|
|
21
|
+
externalPositionProxy: IExternalPositionProxy;
|
|
22
|
+
receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: BytesLike], void, ComptrollerLib>>;
|
|
23
|
+
}>;
|
|
24
|
+
export declare function reactivateExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, }: {
|
|
25
|
+
signer: SignerWithAddress;
|
|
26
|
+
comptrollerProxy: ComptrollerLib;
|
|
27
|
+
externalPositionManager: ExternalPositionManager;
|
|
28
|
+
externalPositionProxy: AddressLike;
|
|
29
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: BytesLike], void, ComptrollerLib>>>;
|
|
30
|
+
export declare function removeExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, }: {
|
|
31
|
+
signer: SignerWithAddress;
|
|
32
|
+
comptrollerProxy: ComptrollerLib;
|
|
33
|
+
externalPositionManager: ExternalPositionManager;
|
|
34
|
+
externalPositionProxy: AddressLike;
|
|
35
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: BytesLike], void, ComptrollerLib>>>;
|