Skip to content

Commit

Permalink
improve(test): Allow caller to identify SpokePool contract (#428)
Browse files Browse the repository at this point in the history
This eases the test implementation downstream in sdk-v2.
  • Loading branch information
pxrl authored Feb 9, 2024
1 parent 5691bf1 commit df87470
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@across-protocol/contracts-v2",
"version": "2.5.0-beta.2",
"version": "2.5.0-beta.3",
"author": "UMA Team",
"license": "AGPL-3.0-only",
"repository": {
Expand Down
7 changes: 5 additions & 2 deletions test/fixtures/SpokePool.Fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ export const spokePoolFixture = hre.deployments.createFixture(async ({ ethers })

// Have a separate function that deploys the contract and returns the contract addresses. This is called by the fixture
// to have standard fixture features. It is also exported as a function to enable non-snapshoted deployments.
export async function deploySpokePool(ethers: any): Promise<{
export async function deploySpokePool(
ethers: any,
spokePoolName = "MockSpokePool"
): Promise<{
weth: Contract;
erc20: Contract;
spokePool: Contract;
Expand All @@ -43,7 +46,7 @@ export async function deploySpokePool(ethers: any): Promise<{

// Deploy the pool
const spokePool = await hre.upgrades.deployProxy(
await getContractFactory("MockSpokePool", deployerWallet),
await getContractFactory(spokePoolName, deployerWallet),
[0, crossChainAdmin.address, hubPool.address],
{ kind: "uups", unsafeAllow: ["delegatecall"], constructorArgs: [weth.address] }
);
Expand Down

0 comments on commit df87470

Please sign in to comment.