Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Jul 11, 2023
1 parent 0748dfe commit 555f1a7
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions test/SpokePool.Upgrades.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe("SpokePool Upgrade Functions", async function () {
it("Can upgrade", async function () {
const spokePoolV2 = await hre.upgrades.deployImplementation(await ethers.getContractFactory("MockSpokePoolV2"), {
kind: "uups",
unsafeAllow: ["delegatecall"],
});
const spokePoolV2Contract = (await ethers.getContractFactory("MockSpokePoolV2")).attach(spokePoolV2 as string);

Expand Down
4 changes: 2 additions & 2 deletions test/chain-specific-spokepools/Arbitrum_SpokePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("Arbitrum Spoke Pool", function () {
arbitrumSpokePool = await hre.upgrades.deployProxy(
await getContractFactory("Arbitrum_SpokePool", owner),
[0, l2GatewayRouter.address, owner.address, hubPool.address, l2Weth],
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

await seedContract(arbitrumSpokePool, relayer, [dai], weth, amountHeldByPool);
Expand All @@ -48,7 +48,7 @@ describe("Arbitrum Spoke Pool", function () {
// TODO: Could also use upgrades.prepareUpgrade but I'm unclear of differences
const implementation = await hre.upgrades.deployImplementation(
await getContractFactory("Arbitrum_SpokePool", owner),
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

// upgradeTo fails unless called by cross domain admin
Expand Down
4 changes: 2 additions & 2 deletions test/chain-specific-spokepools/Ethereum_SpokePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe("Ethereum Spoke Pool", function () {
spokePool = await hre.upgrades.deployProxy(
await getContractFactory("Ethereum_SpokePool", owner),
[0, hubPool.address, weth.address],
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

// Seed spoke pool with tokens that it should transfer to the hub pool
Expand All @@ -28,7 +28,7 @@ describe("Ethereum Spoke Pool", function () {
// TODO: Could also use upgrades.prepareUpgrade but I'm unclear of differences
const implementation = await hre.upgrades.deployImplementation(
await getContractFactory("Ethereum_SpokePool", owner),
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

// upgradeTo fails unless called by cross domain admin
Expand Down
4 changes: 2 additions & 2 deletions test/chain-specific-spokepools/Optimism_SpokePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("Optimism Spoke Pool", function () {
optimismSpokePool = await hre.upgrades.deployProxy(
await getContractFactory("MockOptimism_SpokePool", owner),
[weth.address, l2Eth, 0, owner.address, hubPool.address],
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

await seedContract(optimismSpokePool, relayer, [dai], weth, amountHeldByPool);
Expand All @@ -50,7 +50,7 @@ describe("Optimism Spoke Pool", function () {
// TODO: Could also use upgrades.prepareUpgrade but I'm unclear of differences
const implementation = await hre.upgrades.deployImplementation(
await getContractFactory("Optimism_SpokePool", owner),
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

// upgradeTo fails unless called by cross domain admin via messenger contract
Expand Down
4 changes: 2 additions & 2 deletions test/chain-specific-spokepools/Polygon_SpokePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("Polygon Spoke Pool", function () {
polygonSpokePool = await hre.upgrades.deployProxy(
await getContractFactory("Polygon_SpokePool", owner),
[0, polygonTokenBridger.address, owner.address, hubPool.address, weth.address, fxChild.address],
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

await seedContract(polygonSpokePool, relayer, [dai], weth, amountHeldByPool);
Expand All @@ -57,7 +57,7 @@ describe("Polygon Spoke Pool", function () {
// TODO: Could also use upgrades.prepareUpgrade but I'm unclear of differences
const implementation = await hre.upgrades.deployImplementation(
await getContractFactory("Polygon_SpokePool", owner),
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);

// upgradeTo fails unless called by cross domain admin
Expand Down
2 changes: 1 addition & 1 deletion test/chain-specific-spokepools/Succinct_SpokePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("Succinct Spoke Pool", function () {
succinctSpokePool = await hre.upgrades.deployProxy(
await getContractFactory("Succinct_SpokePool", owner),
[l1ChainId, succinctTargetAmb.address, 0, hubPool.address, hubPool.address, weth.address],
{ kind: "uups" }
{ kind: "uups", unsafeAllow: ["delegatecall"] }
);
});

Expand Down

0 comments on commit 555f1a7

Please sign in to comment.