@enzymefinance/testutils 4.0.0-next.3 → 4.0.0-next.5

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 4.0.0-next.3
4
12
 
5
13
  ### Patch Changes
@@ -1,13 +1,10 @@
1
- import type { Contract } from '@enzymefinance/ethers';
2
- import type { SignerWithAddress } from '@enzymefinance/hardhat';
3
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';
4
- import type { DeploymentConfig } from '../../../deploy/utils/config';
5
- export declare function getNamedSigner(name: string): Promise<SignerWithAddress>;
6
- export declare function getUnnamedSigners(): Promise<SignerWithAddress[]>;
2
+ export declare function getNamedSigner(name: string): Promise<import("@enzymefinance/hardhat").SignerWithAddress>;
3
+ export declare function getUnnamedSigners(): Promise<import("@enzymefinance/hardhat").SignerWithAddress[]>;
7
4
  export declare function deployProtocolFixture(): Promise<{
8
- readonly accounts: SignerWithAddress[];
5
+ readonly accounts: import("@enzymefinance/hardhat").SignerWithAddress[];
9
6
  readonly config: DeploymentConfig;
10
- readonly deployer: SignerWithAddress;
7
+ readonly deployer: import("@enzymefinance/hardhat").SignerWithAddress;
11
8
  readonly deployment: {
12
9
  readonly aaveAdapter: AaveAdapter;
13
10
  readonly aavePriceFeed: AavePriceFeed;
@@ -81,15 +78,104 @@ export declare function deployProtocolFixture(): Promise<{
81
78
  };
82
79
  }>;
83
80
  declare type Resolve<T extends () => any> = ReturnType<T> extends Promise<infer U> ? U : ReturnType<T>;
84
- declare type ContractMap = Record<string, Contract>;
85
- export interface DeploymentFixtureWithoutConfig<T extends ContractMap> {
86
- deployer: SignerWithAddress;
87
- deployment: T;
88
- accounts: SignerWithAddress[];
89
- }
90
- export interface DeploymentFixtureWithConfig<T extends ContractMap> extends DeploymentFixtureWithoutConfig<T> {
91
- config: DeploymentConfig;
92
- }
93
81
  export declare type ProtocolDeployment = Resolve<typeof deployProtocolFixture>;
94
- export declare function defaultTestDeployment(_: any): Promise<any>;
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
+ }
95
181
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { AddressLike } from '@enzymefinance/ethers';
2
2
  import type { SignerWithAddress } from '@enzymefinance/hardhat';
3
- import type { ComptrollerLib, ExternalPositionFactory, ExternalPositionManager } from '@enzymefinance/protocol/src';
4
- import { MockGenericExternalPositionLib, MockGenericExternalPositionParser } from '@enzymefinance/protocol/src';
3
+ import type { ComptrollerLib, ExternalPositionFactory, ExternalPositionManager } from '@enzymefinance/protocol';
4
+ import { MockGenericExternalPositionLib, MockGenericExternalPositionParser } from '@enzymefinance/protocol';
5
5
  import type { BigNumberish } from 'ethers';
6
6
  export declare function createMockExternalPosition({ comptrollerProxy, externalPositionManager, externalPositionFactory, defaultActionAssetsToTransfer, defaultActionAmountsToTransfer, defaultActionAssetsToReceive, fundOwner, deployer, }: {
7
7
  comptrollerProxy: ComptrollerLib;
@@ -26,7 +26,7 @@ export declare function mockExternalPositionAddDebtAssets({ signer, comptrollerP
26
26
  externalPositionProxy: AddressLike;
27
27
  assets: AddressLike[];
28
28
  amounts: BigNumberish[];
29
- }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, import("@enzymefinance/protocol").ComptrollerLib>>>;
29
+ }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
30
30
  export declare function mockExternalPositionAddManagedAssets({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, assets, amounts, }: {
31
31
  signer: SignerWithAddress;
32
32
  comptrollerProxy: ComptrollerLib;
@@ -34,7 +34,7 @@ export declare function mockExternalPositionAddManagedAssets({ signer, comptroll
34
34
  externalPositionProxy: AddressLike;
35
35
  assets: AddressLike[];
36
36
  amounts: BigNumberish[];
37
- }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, import("@enzymefinance/protocol").ComptrollerLib>>>;
37
+ }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
38
38
  export declare function mockExternalPositionRemoveDebtAssets({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, assets, amounts, }: {
39
39
  signer: SignerWithAddress;
40
40
  comptrollerProxy: ComptrollerLib;
@@ -42,7 +42,7 @@ export declare function mockExternalPositionRemoveDebtAssets({ signer, comptroll
42
42
  externalPositionProxy: AddressLike;
43
43
  assets: AddressLike[];
44
44
  amounts: BigNumberish[];
45
- }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, import("@enzymefinance/protocol").ComptrollerLib>>>;
45
+ }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
46
46
  export declare function mockExternalPositionRemoveManagedAssets({ signer, comptrollerProxy, externalPositionManager, externalPositionProxy, assets, amounts, }: {
47
47
  signer: SignerWithAddress;
48
48
  comptrollerProxy: ComptrollerLib;
@@ -50,4 +50,4 @@ export declare function mockExternalPositionRemoveManagedAssets({ signer, comptr
50
50
  externalPositionProxy: AddressLike;
51
51
  assets: AddressLike[];
52
52
  amounts: BigNumberish[];
53
- }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, import("@enzymefinance/protocol").ComptrollerLib>>>;
53
+ }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
@@ -90,3 +90,10 @@ export declare function uniswapV3LiquidityPositionRemoveLiquidity({ signer, comp
90
90
  amount0Min?: BigNumberish;
91
91
  amount1Min?: BigNumberish;
92
92
  }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: import("ethers").BytesLike], void, ComptrollerLib>>>;
93
+ export declare function uniswapV3OrderTokenPair({ tokenA, tokenB }: {
94
+ tokenA: AddressLike;
95
+ tokenB: AddressLike;
96
+ }): {
97
+ token0: string;
98
+ token1: string;
99
+ };
@@ -1,9 +1,8 @@
1
1
  import type { AddressLike, Contract, Send } from '@enzymefinance/ethers';
2
2
  import type { SignerWithAddress } from '@enzymefinance/hardhat';
3
- import type { CompoundAdapter, IntegrationManager, VaultLib } from '@enzymefinance/protocol';
3
+ import type { CompoundAdapter, ComptrollerLib, IntegrationManager, VaultLib } from '@enzymefinance/protocol';
4
4
  import type { BigNumberish } from 'ethers';
5
5
  import { utils } from 'ethers';
6
- import type { ComptrollerLib } from '../../../../../protocol/src/codegen/ComptrollerLib';
7
6
  export interface ICompoundComptroller extends Contract<ICompoundComptroller> {
8
7
  claimComp: Send<(_account: AddressLike) => void>;
9
8
  }
@@ -12,6 +12,13 @@ export declare function synthetixResolveAddress({ addressResolver, name, }: {
12
12
  addressResolver: ISynthetixAddressResolver;
13
13
  name: string;
14
14
  }): Promise<string>;
15
+ export declare function synthetixRedeem({ comptrollerProxy, integrationManager, signer, synthetixAdapter, synths, }: {
16
+ comptrollerProxy: ComptrollerLib;
17
+ integrationManager: IntegrationManager;
18
+ signer: Signer;
19
+ synthetixAdapter: SynthetixAdapter;
20
+ synths: AddressLike[];
21
+ }): Promise<import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_extension: AddressLike, _actionId: BigNumberish, _callArgs: utils.BytesLike], void, ComptrollerLib>>>;
15
22
  export declare function synthetixTakeOrder({ comptrollerProxy, vaultProxy, integrationManager, fundOwner, synthetixAdapter, outgoingAsset, outgoingAssetAmount, incomingAsset, minIncomingAssetAmount, seedFund, }: {
16
23
  comptrollerProxy: ComptrollerLib;
17
24
  vaultProxy: VaultLib;
@@ -22,6 +22,7 @@ export interface CreateNewFundParams {
22
22
  sharesActionTimelock?: BigNumberish;
23
23
  fundOwner?: AddressLike;
24
24
  fundName?: string;
25
+ fundSymbol?: string;
25
26
  feeManagerConfig?: BytesLike;
26
27
  policyManagerConfig?: BytesLike;
27
28
  investment?: InitialInvestmentParams;
@@ -48,9 +49,9 @@ export declare function createMigrationRequest({ signer, fundDeployer, vaultProx
48
49
  comptrollerProxy: ComptrollerLib;
49
50
  receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_vaultProxy: AddressLike, _denominationAsset: AddressLike, _sharesActionTimelock: BigNumberish, _feeManagerConfigData: BytesLike, _policyManagerConfigData: BytesLike, _bypassPrevReleaseFailure: boolean], string, FundDeployer>>;
50
51
  }>;
51
- export declare function createNewFund({ signer, fundDeployer, denominationAsset, sharesActionTimelock, fundOwner, fundName, feeManagerConfig, policyManagerConfig, investment, }: CreateNewFundParams): Promise<{
52
+ export declare function createNewFund({ signer, fundDeployer, denominationAsset, sharesActionTimelock, fundOwner, fundName, fundSymbol, feeManagerConfig, policyManagerConfig, investment, }: CreateNewFundParams): Promise<{
52
53
  comptrollerProxy: ComptrollerLib;
53
- receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_fundOwner: AddressLike, _fundName: string, _denominationAsset: AddressLike, _sharesActionTimelock: BigNumberish, _feeManagerConfigData: BytesLike, _policyManagerConfigData: BytesLike], {
54
+ receipt: import("@enzymefinance/ethers").ContractReceipt<import("@enzymefinance/ethers").SendFunction<[_fundOwner: AddressLike, _fundName: string, _fundSymbol: string, _denominationAsset: AddressLike, _sharesActionTimelock: BigNumberish, _feeManagerConfigData: BytesLike, _policyManagerConfigData: BytesLike], {
54
55
  comptrollerProxy_: string;
55
56
  vaultProxy_: string;
56
57
  }, FundDeployer>>;
@@ -1,6 +1,15 @@
1
1
  import type { AddressLike } from '@enzymefinance/ethers';
2
- import type { ComptrollerLib } from '@enzymefinance/protocol';
2
+ import type { SignerWithAddress } from '@enzymefinance/hardhat';
3
+ import type { AddressListRegistry, AddressListUpdateType, ComptrollerLib } from '@enzymefinance/protocol';
3
4
  import { utils } from 'ethers';
5
+ export declare function vaultCallCreateNewList({ addressListRegistry, comptrollerProxy, items, owner, signer, updateType, }: {
6
+ addressListRegistry: AddressListRegistry;
7
+ comptrollerProxy: ComptrollerLib;
8
+ items: AddressLike[];
9
+ owner: AddressLike;
10
+ signer: SignerWithAddress;
11
+ updateType: AddressListUpdateType;
12
+ }): Promise<import("ethers").BigNumber>;
4
13
  export declare function vaultCallCurveMinterMint({ comptrollerProxy, minter, gauge, }: {
5
14
  comptrollerProxy: ComptrollerLib;
6
15
  minter: AddressLike;
@@ -27,7 +27,9 @@ declare const whales: {
27
27
  readonly cusdc: "0xb3bd459e0598dde1fe84b1d0a1430be175b5d5be";
28
28
  readonly ptUsdc: "0xd18236cd213f39d078177b6f6908f0e44e88e4aa";
29
29
  readonly seth: "0xc34a7c65aa08cb36744bda8eeec7b8e9891e147c";
30
- readonly seur: "0xe896e539e557bc751860a7763c8dd589af1698ce";
30
+ readonly seur: "0xc3f2f91723b16b95bef0619b2504c049075d5b0b";
31
+ readonly sxag: "0x40d68c490bf7262ec40048099aec23535f734be2";
32
+ readonly sxau: "0x92eb453b7b5b8d41edb44e2c8b8b53eb70a482c7";
31
33
  readonly lidoSteth: "0x31f644e2dd5d74f5c8d6d9de89dd517474d51800";
32
34
  readonly ldo: "0x3dba737ccc50a32a1764b493285dd51c8af6c278";
33
35
  readonly eurs: "0x98ed26de6451db36246672df78ae7c50f2c76f6d";
@@ -35,6 +37,6 @@ declare const whales: {
35
37
  export declare type Whale = keyof typeof whales;
36
38
  export declare type WhaleSigners<T extends Partial<Whale> = Whale> = Record<T, SignerWithAddress>;
37
39
  export declare function unlockWhale(token: Whale): Promise<SignerWithAddress>;
38
- export declare function unlockAllWhales(): Promise<WhaleSigners<"mln" | "bat" | "bnb" | "bnt" | "busd" | "comp" | "crv" | "dai" | "knc" | "link" | "mana" | "rep" | "ren" | "susd" | "uni" | "usdc" | "usdt" | "weth" | "zrx" | "ausdc" | "ccomp" | "cdai" | "ceth" | "cuni" | "cusdc" | "ptUsdc" | "seth" | "seur" | "lidoSteth" | "ldo" | "eurs">>;
40
+ export declare function unlockAllWhales(): Promise<WhaleSigners<"mln" | "bat" | "bnb" | "bnt" | "busd" | "comp" | "crv" | "dai" | "knc" | "link" | "mana" | "rep" | "ren" | "susd" | "uni" | "usdc" | "usdt" | "weth" | "zrx" | "ausdc" | "ccomp" | "cdai" | "ceth" | "cuni" | "cusdc" | "ptUsdc" | "seth" | "seur" | "sxag" | "sxau" | "lidoSteth" | "ldo" | "eurs">>;
39
41
  export declare function unlockWhales<T extends Whale>(...tokens: T[]): Promise<WhaleSigners<T>>;
40
42
  export {};