@enzymefinance/testutils 4.0.0-next.2 → 4.0.0-next.7
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 +32 -0
- package/dist/declarations/src/assertions.d.ts +2 -2
- package/dist/declarations/src/deployment.d.ts +172 -68
- package/dist/declarations/src/gasRelayer.d.ts +14 -12
- package/dist/declarations/src/helpers.d.ts +5 -4
- package/dist/declarations/src/scaffolding/assets.d.ts +4 -4
- package/dist/declarations/src/scaffolding/chainlink.d.ts +2 -2
- package/dist/declarations/src/scaffolding/common.d.ts +1 -1
- package/dist/declarations/src/scaffolding/core.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/common.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/external-positions/actions.d.ts +8 -6
- package/dist/declarations/src/scaffolding/extensions/external-positions/compound.d.ts +5 -5
- package/dist/declarations/src/scaffolding/extensions/external-positions/index.d.ts +1 -0
- package/dist/declarations/src/scaffolding/extensions/external-positions/mocks.d.ts +16 -12
- package/dist/declarations/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.d.ts +100 -0
- package/dist/declarations/src/scaffolding/extensions/fees.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/aave.d.ts +6 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/compound.d.ts +33 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/curve.d.ts +101 -84
- package/dist/declarations/src/scaffolding/extensions/integrations/idle.d.ts +6 -6
- package/dist/declarations/src/scaffolding/extensions/integrations/index.d.ts +3 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/mock.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/olympusV2.d.ts +17 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/paraSwapV4.d.ts +6 -5
- 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 +15 -12
- package/dist/declarations/src/scaffolding/extensions/integrations/trackedAssets.d.ts +3 -3
- package/dist/declarations/src/scaffolding/extensions/integrations/uniswapV2.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/uniswapV3.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/integrations/yearn.d.ts +5 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/zeroExV2.d.ts +4 -4
- package/dist/declarations/src/scaffolding/extensions/policies.d.ts +9 -9
- package/dist/declarations/src/scaffolding/setup.d.ts +11 -9
- package/dist/declarations/src/scaffolding/shares.d.ts +4 -4
- package/dist/declarations/src/scaffolding/vaultCalls.d.ts +11 -2
- package/dist/declarations/src/whales.d.ts +24 -19
- package/dist/enzymefinance-testutils.browser.cjs.js +1541 -673
- package/dist/enzymefinance-testutils.browser.esm.js +1502 -655
- package/dist/enzymefinance-testutils.cjs.dev.js +1541 -673
- package/dist/enzymefinance-testutils.cjs.prod.js +1541 -673
- package/dist/enzymefinance-testutils.esm.js +1502 -655
- package/package.json +6 -6
- package/src/assertions.ts +5 -2
- package/src/deployment.ts +221 -120
- package/src/gasRelayer.ts +17 -18
- package/src/helpers.ts +6 -4
- package/src/scaffolding/assets.ts +7 -6
- package/src/scaffolding/chainlink.ts +2 -2
- package/src/scaffolding/common.ts +1 -1
- package/src/scaffolding/core.ts +4 -8
- package/src/scaffolding/extensions/common.ts +4 -4
- package/src/scaffolding/extensions/external-positions/actions.ts +14 -9
- package/src/scaffolding/extensions/external-positions/compound.ts +28 -29
- package/src/scaffolding/extensions/external-positions/index.ts +1 -0
- package/src/scaffolding/extensions/external-positions/mocks.ts +32 -36
- package/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.ts +284 -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 +171 -11
- package/src/scaffolding/extensions/integrations/curve.ts +303 -255
- package/src/scaffolding/extensions/integrations/idle.ts +9 -11
- package/src/scaffolding/extensions/integrations/index.ts +3 -0
- package/src/scaffolding/extensions/integrations/mock.ts +11 -13
- package/src/scaffolding/extensions/integrations/olympusV2.ts +71 -0
- 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 -31
- package/src/scaffolding/extensions/integrations/trackedAssets.ts +3 -4
- package/src/scaffolding/extensions/integrations/uniswapV2.ts +22 -19
- 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 -13
- package/src/scaffolding/shares.ts +5 -4
- package/src/scaffolding/vaultCalls.ts +32 -2
- package/src/types.d.ts +1 -0
- package/src/whales.ts +36 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @enzymefinance/testutils
|
|
2
2
|
|
|
3
|
+
## 4.0.0-next.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 837da449: Upgrade dependencies and publish new version
|
|
8
|
+
- Updated dependencies [837da449]
|
|
9
|
+
- @enzymefinance/protocol@4.0.0-next.7
|
|
10
|
+
|
|
11
|
+
## 4.0.0-next.6
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 10b83667: Upgrade deps and publish new version
|
|
16
|
+
- Updated dependencies [10b83667]
|
|
17
|
+
- @enzymefinance/protocol@4.0.0-next.6
|
|
18
|
+
|
|
19
|
+
## 4.0.0-next.5
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 8b844ad4: Publish with call signatures.
|
|
24
|
+
- Updated dependencies [8b844ad4]
|
|
25
|
+
- @enzymefinance/protocol@4.0.0-next.5
|
|
26
|
+
|
|
27
|
+
## 4.0.0-next.3
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- 90955319: Publishing new adapters
|
|
32
|
+
- Updated dependencies [90955319]
|
|
33
|
+
- @enzymefinance/protocol@4.0.0-next.3
|
|
34
|
+
|
|
3
35
|
## 4.0.0-next.2
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
-
import { utils } from 'ethers';
|
|
1
|
+
import type { ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
+
import type { utils } from 'ethers';
|
|
3
3
|
export declare function assertEvent<TResult = any>(receipt: ContractReceipt<any>, event: string | utils.EventFragment, match?: TResult): NonNullable<TResult>;
|
|
4
4
|
export declare function assertNoEvent(receipt: ContractReceipt<any>, event: string | utils.EventFragment): void;
|
|
@@ -1,91 +1,195 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { DeploymentConfig } from '../../../deploy/utils/config';
|
|
5
|
-
export declare function getNamedSigner(name: string): Promise<SignerWithAddress>;
|
|
6
|
-
export declare function getUnnamedSigners(): Promise<SignerWithAddress[]>;
|
|
1
|
+
import { AaveAdapter, AavePriceFeed, AddressListRegistry, AllowedAdapterIncomingAssetsPolicy, AllowedAdaptersPolicy, AllowedAssetsForRedemptionPolicy, AllowedDepositRecipientsPolicy, AllowedExternalPositionTypesPolicy, AllowedSharesTransferRecipientsPolicy, CompoundAdapter, CompoundDebtPositionLib, CompoundDebtPositionParser, CompoundPriceFeed, ComptrollerLib, ConvexCurveLpStakingAdapter, ConvexCurveLpStakingWrapperFactory, ConvexCurveLpStakingWrapperPriceFeed, CumulativeSlippageTolerancePolicy, CurveExchangeAdapter, CurveLiquidityAaveAdapter, CurveLiquidityAdapter, CurveLiquiditySethAdapter, CurveLiquidityStethAdapter, CurvePriceFeed, DepositWrapper, Dispatcher, EntranceRateBurnFee, EntranceRateDirectFee, ExitRateBurnFee, ExitRateDirectFee, ExternalPositionFactory, ExternalPositionManager, FeeManager, FundDeployer, FundValueCalculator, FundValueCalculatorRouter, FundValueCalculatorUsdWrapper, FuseAdapter, FusePriceFeed, GasRelayPaymasterFactory, IdleAdapter, IdlePriceFeed, IntegrationManager, LidoStethPriceFeed, ManagementFee, MinAssetBalancesPostRedemptionPolicy, MinMaxInvestmentPolicy, OlympusV2Adapter, OnlyRemoveDustExternalPositionPolicy, OnlyUntrackDustOrPricelessAssetsPolicy, ParaSwapV4Adapter, ParaSwapV5Adapter, PerformanceFee, PolicyManager, PoolTogetherV4Adapter, PoolTogetherV4PriceFeed, ProtocolFeeReserveLib, ProtocolFeeTracker, RevertingPriceFeed, StakehoundEthPriceFeed, SynthetixAdapter, UniswapV2ExchangeAdapter, UniswapV2LiquidityAdapter, UniswapV2PoolPriceFeed, UniswapV3Adapter, UnpermissionedActionsWrapper, ValueInterpreter, VaultLib, YearnVaultV2Adapter, YearnVaultV2PriceFeed, ZeroExV2Adapter } from '@enzymefinance/protocol';
|
|
2
|
+
export declare function getNamedSigner(name: string): Promise<import("@nomiclabs/hardhat-ethers/signers").SignerWithAddress>;
|
|
3
|
+
export declare function getUnnamedSigners(): Promise<import("@nomiclabs/hardhat-ethers/signers").SignerWithAddress[]>;
|
|
7
4
|
export declare function deployProtocolFixture(): Promise<{
|
|
8
|
-
readonly
|
|
5
|
+
readonly accounts: import("@nomiclabs/hardhat-ethers/signers").SignerWithAddress[];
|
|
6
|
+
readonly config: DeploymentConfig;
|
|
7
|
+
readonly deployer: import("@nomiclabs/hardhat-ethers/signers").SignerWithAddress;
|
|
9
8
|
readonly deployment: {
|
|
10
|
-
readonly
|
|
11
|
-
readonly vaultLib: VaultLib;
|
|
12
|
-
readonly fundDeployer: FundDeployer;
|
|
13
|
-
readonly policyManager: PolicyManager;
|
|
9
|
+
readonly aaveAdapter: AaveAdapter;
|
|
14
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 compoundAdapter: CompoundAdapter;
|
|
15
19
|
readonly compoundDebtPositionLib: CompoundDebtPositionLib;
|
|
16
20
|
readonly compoundDebtPositionParser: CompoundDebtPositionParser;
|
|
17
21
|
readonly compoundPriceFeed: CompoundPriceFeed;
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly yearnVaultV2PriceFeed: YearnVaultV2PriceFeed;
|
|
25
|
-
readonly valueInterpreter: ValueInterpreter;
|
|
26
|
-
readonly uniswapV2PoolPriceFeed: UniswapV2PoolPriceFeed;
|
|
27
|
-
readonly integrationManager: IntegrationManager;
|
|
28
|
-
readonly externalPositionManager: ExternalPositionManager;
|
|
29
|
-
readonly externalPositionFactory: ExternalPositionFactory;
|
|
22
|
+
readonly comptrollerLib: ComptrollerLib;
|
|
23
|
+
readonly convexCurveLpStakingAdapter: ConvexCurveLpStakingAdapter;
|
|
24
|
+
readonly convexCurveLpStakingWrapperFactory: ConvexCurveLpStakingWrapperFactory;
|
|
25
|
+
readonly convexCurveLpStakingWrapperPriceFeed: ConvexCurveLpStakingWrapperPriceFeed;
|
|
26
|
+
readonly cumulativeSlippageTolerancePolicy: CumulativeSlippageTolerancePolicy;
|
|
27
|
+
readonly curveExchangeAdapter: CurveExchangeAdapter;
|
|
30
28
|
readonly curveLiquidityAaveAdapter: CurveLiquidityAaveAdapter;
|
|
31
|
-
readonly
|
|
29
|
+
readonly curveLiquidityAdapter: CurveLiquidityAdapter;
|
|
32
30
|
readonly curveLiquiditySethAdapter: CurveLiquiditySethAdapter;
|
|
33
31
|
readonly curveLiquidityStethAdapter: CurveLiquidityStethAdapter;
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
37
|
-
readonly synthetixAdapter: SynthetixAdapter;
|
|
38
|
-
readonly yearnVaultV2Adapter: YearnVaultV2Adapter;
|
|
39
|
-
readonly zeroExV2Adapter: ZeroExV2Adapter;
|
|
40
|
-
readonly compoundAdapter: CompoundAdapter;
|
|
41
|
-
readonly uniswapV2ExchangeAdapter: UniswapV2ExchangeAdapter;
|
|
42
|
-
readonly uniswapV2LiquidityAdapter: UniswapV2LiquidityAdapter;
|
|
43
|
-
readonly uniswapV3Adapter: UniswapV3Adapter;
|
|
44
|
-
readonly curveExchangeAdapter: CurveExchangeAdapter;
|
|
45
|
-
readonly feeManager: FeeManager;
|
|
46
|
-
readonly comptrollerLib: ComptrollerLib;
|
|
32
|
+
readonly curvePriceFeed: CurvePriceFeed;
|
|
33
|
+
readonly depositWrapper: DepositWrapper;
|
|
34
|
+
readonly dispatcher: Dispatcher;
|
|
47
35
|
readonly entranceRateBurnFee: EntranceRateBurnFee;
|
|
48
36
|
readonly entranceRateDirectFee: EntranceRateDirectFee;
|
|
49
37
|
readonly exitRateBurnFee: ExitRateBurnFee;
|
|
50
38
|
readonly exitRateDirectFee: ExitRateDirectFee;
|
|
39
|
+
readonly externalPositionFactory: ExternalPositionFactory;
|
|
40
|
+
readonly externalPositionManager: ExternalPositionManager;
|
|
41
|
+
readonly feeManager: FeeManager;
|
|
42
|
+
readonly fundDeployer: FundDeployer;
|
|
43
|
+
readonly fundValueCalculator: FundValueCalculator;
|
|
44
|
+
readonly fundValueCalculatorRouter: FundValueCalculatorRouter;
|
|
45
|
+
readonly fundValueCalculatorUsdWrapper: FundValueCalculatorUsdWrapper;
|
|
46
|
+
readonly fuseAdapter: FuseAdapter;
|
|
47
|
+
readonly fusePriceFeed: FusePriceFeed;
|
|
48
|
+
readonly gasRelayPaymasterFactory: GasRelayPaymasterFactory;
|
|
49
|
+
readonly idleAdapter: IdleAdapter;
|
|
50
|
+
readonly idlePriceFeed: IdlePriceFeed;
|
|
51
|
+
readonly integrationManager: IntegrationManager;
|
|
52
|
+
readonly lidoStethPriceFeed: LidoStethPriceFeed;
|
|
51
53
|
readonly managementFee: ManagementFee;
|
|
52
|
-
readonly
|
|
53
|
-
readonly depositWrapper: DepositWrapper;
|
|
54
|
-
readonly unpermissionedActionsWrapper: UnpermissionedActionsWrapper;
|
|
55
|
-
readonly allowedAdapterIncomingAssetsPolicy: AllowedAdapterIncomingAssetsPolicy;
|
|
54
|
+
readonly minAssetBalancesPostRedemptionPolicy: MinAssetBalancesPostRedemptionPolicy;
|
|
56
55
|
readonly minMaxInvestmentPolicy: MinMaxInvestmentPolicy;
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
56
|
+
readonly olympusV2Adapter: OlympusV2Adapter;
|
|
57
|
+
readonly onlyRemoveDustExternalPositionPolicy: OnlyRemoveDustExternalPositionPolicy;
|
|
58
|
+
readonly onlyUntrackDustOrPricelessAssetsPolicy: OnlyUntrackDustOrPricelessAssetsPolicy;
|
|
59
|
+
readonly paraSwapV4Adapter: ParaSwapV4Adapter;
|
|
60
|
+
readonly paraSwapV5Adapter: ParaSwapV5Adapter;
|
|
61
|
+
readonly performanceFee: PerformanceFee;
|
|
62
|
+
readonly policyManager: PolicyManager;
|
|
63
|
+
readonly poolTogetherV4Adapter: PoolTogetherV4Adapter;
|
|
64
|
+
readonly poolTogetherV4PriceFeed: PoolTogetherV4PriceFeed;
|
|
60
65
|
readonly protocolFeeReserveLib: ProtocolFeeReserveLib;
|
|
61
66
|
readonly protocolFeeReserveProxy: ProtocolFeeReserveLib;
|
|
62
67
|
readonly protocolFeeTracker: ProtocolFeeTracker;
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
66
|
-
readonly
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
74
|
-
readonly
|
|
68
|
+
readonly revertingPriceFeed: RevertingPriceFeed;
|
|
69
|
+
readonly stakehoundEthPriceFeed: StakehoundEthPriceFeed;
|
|
70
|
+
readonly synthetixAdapter: SynthetixAdapter;
|
|
71
|
+
readonly uniswapV2ExchangeAdapter: UniswapV2ExchangeAdapter;
|
|
72
|
+
readonly uniswapV2LiquidityAdapter: UniswapV2LiquidityAdapter;
|
|
73
|
+
readonly uniswapV2PoolPriceFeed: UniswapV2PoolPriceFeed;
|
|
74
|
+
readonly uniswapV3Adapter: UniswapV3Adapter;
|
|
75
|
+
readonly unpermissionedActionsWrapper: UnpermissionedActionsWrapper;
|
|
76
|
+
readonly valueInterpreter: ValueInterpreter;
|
|
77
|
+
readonly vaultLib: VaultLib;
|
|
78
|
+
readonly yearnVaultV2Adapter: YearnVaultV2Adapter;
|
|
79
|
+
readonly yearnVaultV2PriceFeed: YearnVaultV2PriceFeed;
|
|
80
|
+
readonly zeroExV2Adapter: ZeroExV2Adapter;
|
|
75
81
|
};
|
|
76
|
-
readonly accounts: SignerWithAddress[];
|
|
77
|
-
readonly config: DeploymentConfig;
|
|
78
82
|
}>;
|
|
79
83
|
declare type Resolve<T extends () => any> = ReturnType<T> extends Promise<infer U> ? U : ReturnType<T>;
|
|
80
|
-
declare type ContractMap = Record<string, Contract>;
|
|
81
|
-
export interface DeploymentFixtureWithoutConfig<T extends ContractMap> {
|
|
82
|
-
deployer: SignerWithAddress;
|
|
83
|
-
deployment: T;
|
|
84
|
-
accounts: SignerWithAddress[];
|
|
85
|
-
}
|
|
86
|
-
export interface DeploymentFixtureWithConfig<T extends ContractMap> extends DeploymentFixtureWithoutConfig<T> {
|
|
87
|
-
config: DeploymentConfig;
|
|
88
|
-
}
|
|
89
84
|
export declare type ProtocolDeployment = Resolve<typeof deployProtocolFixture>;
|
|
90
|
-
|
|
85
|
+
import type { ChainlinkRateAsset } from '@enzymefinance/protocol';
|
|
86
|
+
export interface DeploymentConfig {
|
|
87
|
+
feeToken: string;
|
|
88
|
+
feeTokenBurn: {
|
|
89
|
+
burnFromVault: boolean;
|
|
90
|
+
sendToProtocolFeeReserve: boolean;
|
|
91
|
+
externalBurnerAddress: string;
|
|
92
|
+
};
|
|
93
|
+
weth: string;
|
|
94
|
+
wrappedNativeAsset: string;
|
|
95
|
+
primitives: Record<string, string>;
|
|
96
|
+
gsn: {
|
|
97
|
+
relayHub: string;
|
|
98
|
+
relayWorker: string;
|
|
99
|
+
trustedForwarder: string;
|
|
100
|
+
};
|
|
101
|
+
chainlink: {
|
|
102
|
+
ethusd: string;
|
|
103
|
+
aggregators: Record<string, readonly [string, ChainlinkRateAsset]>;
|
|
104
|
+
};
|
|
105
|
+
synthetix: {
|
|
106
|
+
snx: string;
|
|
107
|
+
susd: string;
|
|
108
|
+
delegateApprovals: string;
|
|
109
|
+
originator: string;
|
|
110
|
+
redeemer: string;
|
|
111
|
+
trackingCode: string;
|
|
112
|
+
};
|
|
113
|
+
convex: {
|
|
114
|
+
booster: string;
|
|
115
|
+
crvToken: string;
|
|
116
|
+
cvxToken: string;
|
|
117
|
+
};
|
|
118
|
+
curve: {
|
|
119
|
+
addressProvider: string;
|
|
120
|
+
minter: string;
|
|
121
|
+
pools: Record<string, {
|
|
122
|
+
pool: string;
|
|
123
|
+
lpToken: string;
|
|
124
|
+
liquidityGaugeToken: string;
|
|
125
|
+
invariantProxyAsset: string;
|
|
126
|
+
}>;
|
|
127
|
+
};
|
|
128
|
+
aave: {
|
|
129
|
+
lendingPoolAddressProvider: string;
|
|
130
|
+
protocolDataProvider: string;
|
|
131
|
+
atokens: Record<string, [string, string]>;
|
|
132
|
+
};
|
|
133
|
+
compound: {
|
|
134
|
+
ceth: string;
|
|
135
|
+
comptroller: string;
|
|
136
|
+
ctokens: Record<string, string>;
|
|
137
|
+
};
|
|
138
|
+
fuse: {
|
|
139
|
+
fetherTokens: Record<string, string>;
|
|
140
|
+
ftokens: Record<string, string>;
|
|
141
|
+
};
|
|
142
|
+
idle: {
|
|
143
|
+
bestYieldIdleDai: string;
|
|
144
|
+
bestYieldIdleUsdc: string;
|
|
145
|
+
bestYieldIdleUsdt: string;
|
|
146
|
+
bestYieldIdleSusd: string;
|
|
147
|
+
bestYieldIdleTusd: string;
|
|
148
|
+
bestYieldIdleWbtc: string;
|
|
149
|
+
riskAdjustedIdleDai: string;
|
|
150
|
+
riskAdjustedIdleUsdc: string;
|
|
151
|
+
riskAdjustedIdleUsdt: string;
|
|
152
|
+
};
|
|
153
|
+
lido: {
|
|
154
|
+
steth: string;
|
|
155
|
+
};
|
|
156
|
+
olympusV2: {
|
|
157
|
+
stakingContract: string;
|
|
158
|
+
};
|
|
159
|
+
paraSwapV4: {
|
|
160
|
+
augustusSwapper: string;
|
|
161
|
+
tokenTransferProxy: string;
|
|
162
|
+
};
|
|
163
|
+
paraSwapV5: {
|
|
164
|
+
augustusSwapper: string;
|
|
165
|
+
tokenTransferProxy: string;
|
|
166
|
+
};
|
|
167
|
+
poolTogetherV4: {
|
|
168
|
+
ptTokens: Record<string, [string, string]>;
|
|
169
|
+
};
|
|
170
|
+
positionsLimit: number;
|
|
171
|
+
stakehound: {
|
|
172
|
+
steth: string;
|
|
173
|
+
};
|
|
174
|
+
unsupportedAssets: Record<string, string>;
|
|
175
|
+
uniswap: {
|
|
176
|
+
factory: string;
|
|
177
|
+
router: string;
|
|
178
|
+
pools: Record<string, string>;
|
|
179
|
+
};
|
|
180
|
+
uniswapV3: {
|
|
181
|
+
router: string;
|
|
182
|
+
nonFungiblePositionManager: string;
|
|
183
|
+
};
|
|
184
|
+
yearn: {
|
|
185
|
+
vaultV2: {
|
|
186
|
+
registry: string;
|
|
187
|
+
yVaults: Record<string, string>;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
zeroex: {
|
|
191
|
+
exchange: string;
|
|
192
|
+
allowedMakers: string[];
|
|
193
|
+
};
|
|
194
|
+
}
|
|
91
195
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { IGsnRelayHub
|
|
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';
|
|
4
6
|
export interface RelayTransactionOptions extends CreateSignedRelayRequestOptions {
|
|
5
7
|
relayHub: string;
|
|
6
8
|
}
|
|
@@ -29,26 +31,26 @@ export declare function relayTransaction(options: RelayTransactionOptions): Prom
|
|
|
29
31
|
returnValue: string;
|
|
30
32
|
}, IGsnRelayHub>>>;
|
|
31
33
|
export declare function assertDidRelay(receipt: ContractReceipt<any>): {
|
|
32
|
-
|
|
33
|
-
relayWorker: any;
|
|
34
|
+
charge: any;
|
|
34
35
|
from: any;
|
|
35
|
-
to: any;
|
|
36
36
|
paymaster: any;
|
|
37
|
+
relayManager: any;
|
|
38
|
+
relayWorker: any;
|
|
37
39
|
selector: any;
|
|
38
40
|
status: any;
|
|
39
|
-
|
|
41
|
+
to: any;
|
|
40
42
|
};
|
|
41
43
|
export declare function assertDidRelaySuccessfully(receipt: ContractReceipt<any>): void;
|
|
42
44
|
export declare function assertDidRelayWithError(receipt: ContractReceipt<any>): void;
|
|
43
45
|
export declare function assertDidRelayWithCharge(receipt: ContractReceipt<any>, amount: BigNumberish, tolerance?: BigNumberish): void;
|
|
44
46
|
export declare function assertPaymasterDidReject(receipt: ContractReceipt<any>): {
|
|
45
|
-
relayManager: any;
|
|
46
|
-
paymaster: any;
|
|
47
47
|
from: any;
|
|
48
|
-
to: any;
|
|
49
|
-
relayWorker: any;
|
|
50
|
-
selector: any;
|
|
51
48
|
innerGasUsed: any;
|
|
49
|
+
paymaster: any;
|
|
52
50
|
reason: any;
|
|
51
|
+
relayManager: any;
|
|
52
|
+
relayWorker: any;
|
|
53
|
+
selector: any;
|
|
54
|
+
to: any;
|
|
53
55
|
};
|
|
54
56
|
export declare function assertPaymasterDidRejectForReason(receipt: ContractReceipt<any>, reason: string): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AddressLike, ContractReceipt } from '@enzymefinance/ethers';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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';
|
|
4
5
|
export declare function transactionTimestamp(receipt: ContractReceipt<any>): Promise<number>;
|
|
5
6
|
export declare function calcMlnValueAndBurnAmountForSharesBuyback({ valueInterpreter, mln, denominationAsset, sharesSupply, gav, buybackSharesAmount, }: {
|
|
6
7
|
valueInterpreter: ValueInterpreter;
|
|
@@ -10,6 +11,6 @@ export declare function calcMlnValueAndBurnAmountForSharesBuyback({ valueInterpr
|
|
|
10
11
|
gav: BigNumberish;
|
|
11
12
|
buybackSharesAmount: BigNumberish;
|
|
12
13
|
}): Promise<{
|
|
13
|
-
mlnValue: BigNumber;
|
|
14
14
|
mlnAmountToBurn: BigNumber;
|
|
15
|
+
mlnValue: BigNumber;
|
|
15
16
|
}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
2
|
-
import { ComptrollerLib, IntegrationManager, StandardToken } from '@enzymefinance/protocol';
|
|
3
|
-
import { BigNumberish } from 'ethers';
|
|
1
|
+
import type { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
2
|
+
import type { ComptrollerLib, IntegrationManager, StandardToken } from '@enzymefinance/protocol';
|
|
3
|
+
import type { BigNumberish } from 'ethers';
|
|
4
4
|
export declare function addNewAssetsToFund({ signer, comptrollerProxy, integrationManager, assets, amounts, }: {
|
|
5
5
|
signer: SignerWithAddress;
|
|
6
6
|
comptrollerProxy: ComptrollerLib;
|
|
7
7
|
integrationManager: IntegrationManager;
|
|
8
8
|
assets: StandardToken[];
|
|
9
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>>>;
|
|
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 {
|
|
1
|
+
import type { MockChainlinkPriceSource } from '@enzymefinance/protocol';
|
|
2
|
+
import type { BigNumberish } from 'ethers';
|
|
3
3
|
export declare function updateChainlinkAggregator(aggregator: MockChainlinkPriceSource, price?: BigNumberish): Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import type { 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, externalPositionManager, dispatcher, gasRelayPaymasterFactory, valueInterpreter, vaultLib, setOnDispatcher, setReleaseLive, }: {
|
|
4
5
|
deployer: Signer;
|
|
5
|
-
assetFinalityResolver: AssetFinalityResolver;
|
|
6
6
|
externalPositionManager: ExternalPositionManager;
|
|
7
7
|
dispatcher: Dispatcher;
|
|
8
8
|
feeManager: FeeManager;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
-
import { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
-
import { ComptrollerLib } from '@enzymefinance/protocol';
|
|
4
|
-
import { BigNumberish, BytesLike } from 'ethers';
|
|
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
5
|
export declare function callOnExtension({ comptrollerProxy, extension, actionId, callArgs, signer, }: {
|
|
6
6
|
comptrollerProxy: ComptrollerLib;
|
|
7
7
|
extension: AddressLike;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
-
import { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
-
import { ComptrollerLib, ExternalPositionManager
|
|
4
|
-
import {
|
|
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';
|
|
5
6
|
export declare function callOnExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, actionId, actionArgs, }: {
|
|
6
7
|
signer: SignerWithAddress;
|
|
7
8
|
comptrollerProxy: ComptrollerLib;
|
|
@@ -10,15 +11,16 @@ export declare function callOnExternalPosition({ signer, comptrollerProxy, exter
|
|
|
10
11
|
actionId: BigNumberish;
|
|
11
12
|
actionArgs: BytesLike;
|
|
12
13
|
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: BytesLike], void, ComptrollerLib>>>;
|
|
13
|
-
export declare function createExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionTypeId, initializationData, }: {
|
|
14
|
+
export declare function createExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionTypeId, initializationData, callOnExternalPositionData, }: {
|
|
14
15
|
signer: SignerWithAddress;
|
|
15
16
|
comptrollerProxy: ComptrollerLib;
|
|
16
17
|
externalPositionManager: ExternalPositionManager;
|
|
17
18
|
externalPositionTypeId: BigNumberish;
|
|
18
19
|
initializationData?: BytesLike;
|
|
20
|
+
callOnExternalPositionData?: BytesLike;
|
|
19
21
|
}): Promise<{
|
|
20
|
-
receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: BytesLike], void, ComptrollerLib>>;
|
|
21
22
|
externalPositionProxy: IExternalPositionProxy;
|
|
23
|
+
receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: BytesLike], void, ComptrollerLib>>;
|
|
22
24
|
}>;
|
|
23
25
|
export declare function reactivateExternalPosition({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, }: {
|
|
24
26
|
signer: SignerWithAddress;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
-
import { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
-
import { ComptrollerLib, ExternalPositionManager, VaultLib } from '@enzymefinance/protocol';
|
|
4
|
-
import { BigNumberish } from 'ethers';
|
|
1
|
+
import type { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
+
import type { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
+
import type { ComptrollerLib, ExternalPositionManager, VaultLib } from '@enzymefinance/protocol';
|
|
4
|
+
import type { BigNumberish } from 'ethers';
|
|
5
5
|
export declare function compoundDebtPositionAddCollateral({ comptrollerProxy, externalPositionManager, fundOwner, assets, amounts, externalPositionProxy, cTokens, }: {
|
|
6
6
|
comptrollerProxy: ComptrollerLib;
|
|
7
7
|
externalPositionManager: ExternalPositionManager;
|
|
@@ -51,6 +51,6 @@ export declare function createCompoundDebtPosition({ signer, comptrollerProxy, e
|
|
|
51
51
|
comptrollerProxy: ComptrollerLib;
|
|
52
52
|
externalPositionManager: ExternalPositionManager;
|
|
53
53
|
}): Promise<{
|
|
54
|
-
receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>;
|
|
55
54
|
externalPositionProxy: import("@enzymefinance/protocol").IExternalPositionProxy;
|
|
55
|
+
receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>;
|
|
56
56
|
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { AddressLike } from '@enzymefinance/ethers';
|
|
2
|
+
import type { SignerWithAddress } from '@enzymefinance/hardhat';
|
|
3
|
+
import type { ComptrollerLib, ExternalPositionFactory, ExternalPositionManager } from '@enzymefinance/protocol';
|
|
4
|
+
import { MockGenericExternalPositionLib, MockGenericExternalPositionParser } from '@enzymefinance/protocol';
|
|
5
|
+
import type { BigNumberish } from 'ethers';
|
|
5
6
|
export declare function createMockExternalPosition({ comptrollerProxy, externalPositionManager, externalPositionFactory, defaultActionAssetsToTransfer, defaultActionAmountsToTransfer, defaultActionAssetsToReceive, fundOwner, deployer, }: {
|
|
6
7
|
comptrollerProxy: ComptrollerLib;
|
|
7
8
|
externalPositionManager: ExternalPositionManager;
|
|
@@ -12,11 +13,14 @@ export declare function createMockExternalPosition({ comptrollerProxy, externalP
|
|
|
12
13
|
fundOwner: SignerWithAddress;
|
|
13
14
|
deployer: SignerWithAddress;
|
|
14
15
|
}): Promise<{
|
|
15
|
-
typeId: import("ethers").BigNumber;
|
|
16
|
-
mockGenericExternalPositionLib: MockGenericExternalPositionLib;
|
|
17
|
-
mockExternalPositionParser: MockGenericExternalPositionParser;
|
|
18
16
|
externalPositionProxy: string;
|
|
19
|
-
|
|
17
|
+
mockExternalPositionParser: MockGenericExternalPositionParser;
|
|
18
|
+
mockGenericExternalPositionLib: MockGenericExternalPositionLib;
|
|
19
|
+
receipt: {
|
|
20
|
+
externalPositionProxy: import("@enzymefinance/protocol").IExternalPositionProxy;
|
|
21
|
+
receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>;
|
|
22
|
+
};
|
|
23
|
+
typeId: import("ethers").BigNumber;
|
|
20
24
|
}>;
|
|
21
25
|
export declare function mockExternalPositionAddDebtAssets({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, assets, amounts, }: {
|
|
22
26
|
signer: SignerWithAddress;
|
|
@@ -25,7 +29,7 @@ export declare function mockExternalPositionAddDebtAssets({ signer, comptrollerP
|
|
|
25
29
|
externalPositionProxy: AddressLike;
|
|
26
30
|
assets: AddressLike[];
|
|
27
31
|
amounts: BigNumberish[];
|
|
28
|
-
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void,
|
|
32
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
|
|
29
33
|
export declare function mockExternalPositionAddManagedAssets({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, assets, amounts, }: {
|
|
30
34
|
signer: SignerWithAddress;
|
|
31
35
|
comptrollerProxy: ComptrollerLib;
|
|
@@ -33,7 +37,7 @@ export declare function mockExternalPositionAddManagedAssets({ signer, comptroll
|
|
|
33
37
|
externalPositionProxy: AddressLike;
|
|
34
38
|
assets: AddressLike[];
|
|
35
39
|
amounts: BigNumberish[];
|
|
36
|
-
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void,
|
|
40
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
|
|
37
41
|
export declare function mockExternalPositionRemoveDebtAssets({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, assets, amounts, }: {
|
|
38
42
|
signer: SignerWithAddress;
|
|
39
43
|
comptrollerProxy: ComptrollerLib;
|
|
@@ -41,7 +45,7 @@ export declare function mockExternalPositionRemoveDebtAssets({ signer, comptroll
|
|
|
41
45
|
externalPositionProxy: AddressLike;
|
|
42
46
|
assets: AddressLike[];
|
|
43
47
|
amounts: BigNumberish[];
|
|
44
|
-
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void,
|
|
48
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
|
|
45
49
|
export declare function mockExternalPositionRemoveManagedAssets({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, assets, amounts, }: {
|
|
46
50
|
signer: SignerWithAddress;
|
|
47
51
|
comptrollerProxy: ComptrollerLib;
|
|
@@ -49,4 +53,4 @@ export declare function mockExternalPositionRemoveManagedAssets({ signer, comptr
|
|
|
49
53
|
externalPositionProxy: AddressLike;
|
|
50
54
|
assets: AddressLike[];
|
|
51
55
|
amounts: BigNumberish[];
|
|
52
|
-
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void,
|
|
56
|
+
}): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
|