Skip to content

Commit

Permalink
Remove wrong dependency (#2018)
Browse files Browse the repository at this point in the history
* Use hardhat network helpers

* Use helpers for fork tests

* Remove implicit dependency on deployments package

* fix: add missing import

Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: Tom French <tom@tomfren.ch>
  • Loading branch information
3 people authored Nov 16, 2022
1 parent ae345be commit 751f00b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/pool-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@balancer-labs/v2-interfaces": "workspace:*",
"@balancer-labs/v2-solidity-utils": "workspace:*",
"@balancer-labs/v2-vault": "workspace:*",
"@nomicfoundation/hardhat-network-helpers": "^1.0.6",
"@nomiclabs/hardhat-ethers": "^2.2.1",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@types/chai": "^4.3.3",
Expand Down
9 changes: 7 additions & 2 deletions pkg/pool-utils/test/NewBasePool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import { BigNumberish, bn, fp } from '@balancer-labs/v2-helpers/src/numbers';
import { ANY_ADDRESS, DELEGATE_OWNER, MAX_UINT256, ZERO_ADDRESS } from '@balancer-labs/v2-helpers/src/constants';
import { Account } from '@balancer-labs/v2-helpers/src/models/types/types';
import TypesConverter from '@balancer-labs/v2-helpers/src/models/types/TypesConverter';
import { impersonate } from '@balancer-labs/v2-deployments/src/signers';
import { random } from 'lodash';
import { defaultAbiCoder } from 'ethers/lib/utils';
import { sharedBeforeEach } from '@balancer-labs/v2-common/sharedBeforeEach';
import Vault from '@balancer-labs/v2-helpers/src/models/vault/Vault';
import { impersonateAccount, setBalance } from '@nomicfoundation/hardhat-network-helpers';

describe('NewBasePool', function () {
let admin: SignerWithAddress,
Expand All @@ -51,7 +51,12 @@ describe('NewBasePool', function () {
sharedBeforeEach(async () => {
({ instance: vault, authorizer } = await Vault.create({ admin }));

vaultSigner = await impersonate(vault.address);
// We want to call Pools manually from the Vault address for some tests, so we impersonate the Vault and send it
// some ETH in order to be able to have it send transactions.
await impersonateAccount(vault.address);
await setBalance(vault.address, fp(100));
vaultSigner = await SignerWithAddress.create(ethers.provider.getSigner(vault.address));

tokens = await TokenList.create(['DAI', 'MKR', 'SNX'], { sorted: true });
});

Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ __metadata:
"@balancer-labs/v2-interfaces": "workspace:*"
"@balancer-labs/v2-solidity-utils": "workspace:*"
"@balancer-labs/v2-vault": "workspace:*"
"@nomicfoundation/hardhat-network-helpers": ^1.0.6
"@nomiclabs/hardhat-ethers": ^2.2.1
"@nomiclabs/hardhat-waffle": ^2.0.3
"@types/chai": ^4.3.3
Expand Down

0 comments on commit 751f00b

Please sign in to comment.