@enzymefinance/testutils 4.0.3 → 4.0.4
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/index.d.ts +4 -3
- package/dist/index.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
@@ -5,7 +5,7 @@ import { SignerWithAddress, EthereumTestnetProvider } from '@enzymefinance/hardh
|
|
5
5
|
import * as ethers from 'ethers';
|
6
6
|
import { utils, BigNumberish, BigNumber, Signer, BytesLike } from 'ethers';
|
7
7
|
import * as _enzymefinance_protocol from '@enzymefinance/protocol';
|
8
|
-
import { AaveAdapter, AaveDebtPositionLib, AaveDebtPositionParser, AavePriceFeed, AddressListRegistry, AllowedAdapterIncomingAssetsPolicy, AllowedAdaptersPolicy, AllowedAssetsForRedemptionPolicy, AllowedDepositRecipientsPolicy, AllowedExternalPositionTypesPolicy, AllowedSharesTransferRecipientsPolicy, CompoundAdapter, CompoundDebtPositionLib, CompoundDebtPositionParser, CompoundPriceFeed, ComptrollerLib, ConvexCurveLpStakingAdapter, ConvexCurveLpStakingWrapperFactory, ConvexCurveLpStakingWrapperPriceFeed, ConvexVotingPositionLib, ConvexVotingPositionParser, CumulativeSlippageTolerancePolicy, CurveExchangeAdapter, CurveLiquidityAdapter, CurvePriceFeed, DepositWrapper, Dispatcher, EntranceRateBurnFee, EntranceRateDirectFee, ExitRateBurnFee, ExitRateDirectFee, ExternalPositionFactory, ExternalPositionManager, FeeManager, FundDeployer, FundValueCalculator, FundValueCalculatorRouter, FundValueCalculatorUsdWrapper, FuseAdapter, FusePriceFeed, GasRelayPaymasterFactory, GlobalConfigLib, IdleAdapter, IdlePriceFeed, IntegrationManager, LidoStethPriceFeed, LiquityDebtPositionLib, LiquityDebtPositionParser, ManagementFee, ManualValueOracleFactory, MapleLiquidityPositionLib, MapleLiquidityPositionParser, MinAssetBalancesPostRedemptionPolicy, MinMaxInvestmentPolicy, OlympusV2Adapter, OnlyRemoveDustExternalPositionPolicy, OnlyUntrackDustOrPricelessAssetsPolicy, ParaSwapV5Adapter, PerformanceFee, PolicyManager, PoolTogetherV4Adapter, PoolTogetherV4PriceFeed, ProtocolFeeReserveLib, ProtocolFeeTracker, RevertingPriceFeed, SharesSplitterFactory, SynthetixAdapter, UintListRegistry, UniswapV2ExchangeAdapter, UniswapV2LiquidityAdapter, UniswapV2PoolPriceFeed, UniswapV3Adapter, UnpermissionedActionsWrapper, UsdEthSimulatedAggregator, ValueInterpreter, VaultLib, YearnVaultV2Adapter, YearnVaultV2PriceFeed, ZeroExV2Adapter, ChainlinkRateAsset, CreateSignedRelayRequestOptions, IGsnRelayHub, StandardToken, MockChainlinkPriceSource, IExternalPositionProxy, VotiumClaimParam, MockGenericExternalPositionParser, MockGenericExternalPositionLib, IFee, ICERC20, CurveRedeemType, MockGenericAdapter, ParaSwapV5Path, SignedZeroExV2Order, IPolicy, ManualValueOracleLib, SharesSplitterLib, ComptrollerProxy, GasRelayPaymasterLib, AddressListUpdateType } from '@enzymefinance/protocol';
|
8
|
+
import { AaveAdapter, AaveDebtPositionLib, AaveDebtPositionParser, AavePriceFeed, AddressListRegistry, AllowedAdapterIncomingAssetsPolicy, AllowedAdaptersPerManagerPolicy, AllowedAdaptersPolicy, AllowedAssetsForRedemptionPolicy, AllowedDepositRecipientsPolicy, AllowedExternalPositionTypesPolicy, AllowedSharesTransferRecipientsPolicy, CompoundAdapter, CompoundDebtPositionLib, CompoundDebtPositionParser, CompoundPriceFeed, ComptrollerLib, ConvexCurveLpStakingAdapter, ConvexCurveLpStakingWrapperFactory, ConvexCurveLpStakingWrapperPriceFeed, ConvexVotingPositionLib, ConvexVotingPositionParser, CumulativeSlippageTolerancePolicy, CurveExchangeAdapter, CurveLiquidityAdapter, CurvePriceFeed, DepositWrapper, Dispatcher, EntranceRateBurnFee, EntranceRateDirectFee, ExitRateBurnFee, ExitRateDirectFee, ExternalPositionFactory, ExternalPositionManager, FeeManager, FundDeployer, FundValueCalculator, FundValueCalculatorRouter, FundValueCalculatorUsdWrapper, FuseAdapter, FusePriceFeed, GasRelayPaymasterFactory, GlobalConfigLib, IdleAdapter, IdlePriceFeed, IntegrationManager, LidoStethPriceFeed, LiquityDebtPositionLib, LiquityDebtPositionParser, ManagementFee, ManualValueOracleFactory, MapleLiquidityPositionLib, MapleLiquidityPositionParser, MinAssetBalancesPostRedemptionPolicy, MinMaxInvestmentPolicy, OlympusV2Adapter, OnlyRemoveDustExternalPositionPolicy, OnlyUntrackDustOrPricelessAssetsPolicy, ParaSwapV5Adapter, PerformanceFee, PolicyManager, PoolTogetherV4Adapter, PoolTogetherV4PriceFeed, ProtocolFeeReserveLib, ProtocolFeeTracker, RevertingPriceFeed, SharesSplitterFactory, SynthetixAdapter, UintListRegistry, UniswapV2ExchangeAdapter, UniswapV2LiquidityAdapter, UniswapV2PoolPriceFeed, UniswapV3Adapter, UnpermissionedActionsWrapper, UsdEthSimulatedAggregator, ValueInterpreter, VaultLib, YearnVaultV2Adapter, YearnVaultV2PriceFeed, ZeroExV2Adapter, ChainlinkRateAsset, CreateSignedRelayRequestOptions, IGsnRelayHub, StandardToken, MockChainlinkPriceSource, IExternalPositionProxy, VotiumClaimParam, MockGenericExternalPositionParser, MockGenericExternalPositionLib, IFee, ICERC20, CurveRedeemType, MockGenericAdapter, ParaSwapV5Path, SignedZeroExV2Order, IPolicy, ManualValueOracleLib, SharesSplitterLib, ComptrollerProxy, GasRelayPaymasterLib, AddressListUpdateType } from '@enzymefinance/protocol';
|
9
9
|
import { MerkleTree } from 'merkletreejs';
|
10
10
|
|
11
11
|
declare function impersonateContractSigner({ contractAddress, ethSeeder, provider, }: {
|
@@ -34,6 +34,7 @@ declare function deployProtocolFixture(): Promise<{
|
|
34
34
|
readonly aavePriceFeed: AavePriceFeed;
|
35
35
|
readonly addressListRegistry: AddressListRegistry;
|
36
36
|
readonly allowedAdapterIncomingAssetsPolicy: AllowedAdapterIncomingAssetsPolicy;
|
37
|
+
readonly allowedAdaptersPerManagerPolicy: AllowedAdaptersPerManagerPolicy;
|
37
38
|
readonly allowedAdaptersPolicy: AllowedAdaptersPolicy;
|
38
39
|
readonly allowedAssetsForRedemptionPolicy: AllowedAssetsForRedemptionPolicy;
|
39
40
|
readonly allowedDepositRecipientsPolicy: AllowedDepositRecipientsPolicy;
|
@@ -1112,11 +1113,11 @@ declare function mockGenericSwapArgs({ spendAssets, actualSpendAssetAmounts, max
|
|
1112
1113
|
minIncomingAssetAmounts?: BigNumberish[];
|
1113
1114
|
actualIncomingAssetAmounts?: BigNumberish[];
|
1114
1115
|
}): string;
|
1115
|
-
declare function mockGenericSwap({ comptrollerProxy, vaultProxy, integrationManager,
|
1116
|
+
declare function mockGenericSwap({ comptrollerProxy, vaultProxy, integrationManager, signer, mockGenericAdapter, selector, spendAssets, actualSpendAssetAmounts, maxSpendAssetAmounts, incomingAssets, actualIncomingAssetAmounts, minIncomingAssetAmounts, seedFund, }: {
|
1116
1117
|
comptrollerProxy: ComptrollerLib;
|
1117
1118
|
vaultProxy: VaultLib;
|
1118
1119
|
integrationManager: IntegrationManager;
|
1119
|
-
|
1120
|
+
signer: SignerWithAddress;
|
1120
1121
|
mockGenericAdapter: MockGenericAdapter;
|
1121
1122
|
selector?: BytesLike;
|
1122
1123
|
spendAssets?: StandardToken[];
|
package/dist/index.js
CHANGED
@@ -176,6 +176,7 @@ function assertNoEvent(receipt, event) {
|
|
176
176
|
|
177
177
|
|
178
178
|
|
179
|
+
|
179
180
|
|
180
181
|
|
181
182
|
async function getNamedSigner(name) {
|
@@ -201,6 +202,7 @@ async function deployProtocolFixture() {
|
|
201
202
|
aavePriceFeed: new (0, _protocol.AavePriceFeed)(fixture.AavePriceFeed.address, deployer),
|
202
203
|
addressListRegistry: new (0, _protocol.AddressListRegistry)(fixture.AddressListRegistry.address, deployer),
|
203
204
|
allowedAdapterIncomingAssetsPolicy: new (0, _protocol.AllowedAdapterIncomingAssetsPolicy)(fixture.AllowedAdapterIncomingAssetsPolicy.address, deployer),
|
205
|
+
allowedAdaptersPerManagerPolicy: new (0, _protocol.AllowedAdaptersPerManagerPolicy)(fixture.AllowedAdaptersPerManagerPolicy.address, deployer),
|
204
206
|
allowedAdaptersPolicy: new (0, _protocol.AllowedAdaptersPolicy)(fixture.AllowedAdaptersPolicy.address, deployer),
|
205
207
|
allowedAssetsForRedemptionPolicy: new (0, _protocol.AllowedAssetsForRedemptionPolicy)(fixture.AllowedAssetsForRedemptionPolicy.address, deployer),
|
206
208
|
allowedDepositRecipientsPolicy: new (0, _protocol.AllowedDepositRecipientsPolicy)(fixture.AllowedDepositRecipientsPolicy.address, deployer),
|
@@ -2265,7 +2267,7 @@ async function mockGenericSwap({
|
|
2265
2267
|
comptrollerProxy,
|
2266
2268
|
vaultProxy,
|
2267
2269
|
integrationManager,
|
2268
|
-
|
2270
|
+
signer,
|
2269
2271
|
mockGenericAdapter,
|
2270
2272
|
selector = mockGenericSwapASelector,
|
2271
2273
|
spendAssets = [],
|
@@ -2294,7 +2296,7 @@ async function mockGenericSwap({
|
|
2294
2296
|
encodedCallArgs: swapArgs,
|
2295
2297
|
selector
|
2296
2298
|
});
|
2297
|
-
const swapTx = comptrollerProxy.connect(
|
2299
|
+
const swapTx = comptrollerProxy.connect(signer).callOnExtension(integrationManager, _protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2298
2300
|
await expect(swapTx).resolves.toBeReceipt();
|
2299
2301
|
return swapTx;
|
2300
2302
|
}
|
package/dist/index.mjs
CHANGED
@@ -104,6 +104,7 @@ import {
|
|
104
104
|
AavePriceFeed,
|
105
105
|
AddressListRegistry,
|
106
106
|
AllowedAdapterIncomingAssetsPolicy,
|
107
|
+
AllowedAdaptersPerManagerPolicy,
|
107
108
|
AllowedAdaptersPolicy,
|
108
109
|
AllowedAssetsForRedemptionPolicy,
|
109
110
|
AllowedDepositRecipientsPolicy,
|
@@ -201,6 +202,7 @@ async function deployProtocolFixture() {
|
|
201
202
|
aavePriceFeed: new AavePriceFeed(fixture.AavePriceFeed.address, deployer),
|
202
203
|
addressListRegistry: new AddressListRegistry(fixture.AddressListRegistry.address, deployer),
|
203
204
|
allowedAdapterIncomingAssetsPolicy: new AllowedAdapterIncomingAssetsPolicy(fixture.AllowedAdapterIncomingAssetsPolicy.address, deployer),
|
205
|
+
allowedAdaptersPerManagerPolicy: new AllowedAdaptersPerManagerPolicy(fixture.AllowedAdaptersPerManagerPolicy.address, deployer),
|
204
206
|
allowedAdaptersPolicy: new AllowedAdaptersPolicy(fixture.AllowedAdaptersPolicy.address, deployer),
|
205
207
|
allowedAssetsForRedemptionPolicy: new AllowedAssetsForRedemptionPolicy(fixture.AllowedAssetsForRedemptionPolicy.address, deployer),
|
206
208
|
allowedDepositRecipientsPolicy: new AllowedDepositRecipientsPolicy(fixture.AllowedDepositRecipientsPolicy.address, deployer),
|
@@ -2265,7 +2267,7 @@ async function mockGenericSwap({
|
|
2265
2267
|
comptrollerProxy,
|
2266
2268
|
vaultProxy,
|
2267
2269
|
integrationManager,
|
2268
|
-
|
2270
|
+
signer,
|
2269
2271
|
mockGenericAdapter,
|
2270
2272
|
selector = mockGenericSwapASelector,
|
2271
2273
|
spendAssets = [],
|
@@ -2294,7 +2296,7 @@ async function mockGenericSwap({
|
|
2294
2296
|
encodedCallArgs: swapArgs,
|
2295
2297
|
selector
|
2296
2298
|
});
|
2297
|
-
const swapTx = comptrollerProxy.connect(
|
2299
|
+
const swapTx = comptrollerProxy.connect(signer).callOnExtension(integrationManager, IntegrationManagerActionId6.CallOnIntegration, callArgs);
|
2298
2300
|
await expect(swapTx).resolves.toBeReceipt();
|
2299
2301
|
return swapTx;
|
2300
2302
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@enzymefinance/testutils",
|
3
|
-
"version": "4.0.
|
3
|
+
"version": "4.0.4",
|
4
4
|
"description": "Technology Regulated and Operated Investment Funds",
|
5
5
|
"author": "Enzyme Council DAO <council@enzyme.finance>",
|
6
6
|
"license": "GPL-3.0",
|
@@ -45,9 +45,9 @@
|
|
45
45
|
"typecheck": "tsc --noEmit"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@enzymefinance/ethers": "^4.0.
|
49
|
-
"@enzymefinance/hardhat": "^4.0.
|
50
|
-
"@enzymefinance/protocol": "^4.0.
|
48
|
+
"@enzymefinance/ethers": "^4.0.4",
|
49
|
+
"@enzymefinance/hardhat": "^4.0.4",
|
50
|
+
"@enzymefinance/protocol": "^4.0.4",
|
51
51
|
"ethers": "^5.6.8",
|
52
52
|
"merkletreejs": "^0.2.31"
|
53
53
|
},
|