From 555f1a756f3c15137b7354aa407a935016d313dd Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Tue, 11 Jul 2023 18:00:07 -0400 Subject: [PATCH] fix --- test/SpokePool.Upgrades.ts | 1 + test/chain-specific-spokepools/Arbitrum_SpokePool.ts | 4 ++-- test/chain-specific-spokepools/Ethereum_SpokePool.ts | 4 ++-- test/chain-specific-spokepools/Optimism_SpokePool.ts | 4 ++-- test/chain-specific-spokepools/Polygon_SpokePool.ts | 4 ++-- test/chain-specific-spokepools/Succinct_SpokePool.ts | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/test/SpokePool.Upgrades.ts b/test/SpokePool.Upgrades.ts index 38b2b207..aade93be 100644 --- a/test/SpokePool.Upgrades.ts +++ b/test/SpokePool.Upgrades.ts @@ -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); diff --git a/test/chain-specific-spokepools/Arbitrum_SpokePool.ts b/test/chain-specific-spokepools/Arbitrum_SpokePool.ts index 9262f007..7af34818 100644 --- a/test/chain-specific-spokepools/Arbitrum_SpokePool.ts +++ b/test/chain-specific-spokepools/Arbitrum_SpokePool.ts @@ -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); @@ -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 diff --git a/test/chain-specific-spokepools/Ethereum_SpokePool.ts b/test/chain-specific-spokepools/Ethereum_SpokePool.ts index 4dcaa6b2..09704f2b 100644 --- a/test/chain-specific-spokepools/Ethereum_SpokePool.ts +++ b/test/chain-specific-spokepools/Ethereum_SpokePool.ts @@ -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 @@ -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 diff --git a/test/chain-specific-spokepools/Optimism_SpokePool.ts b/test/chain-specific-spokepools/Optimism_SpokePool.ts index f9e36065..97da613a 100644 --- a/test/chain-specific-spokepools/Optimism_SpokePool.ts +++ b/test/chain-specific-spokepools/Optimism_SpokePool.ts @@ -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); @@ -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 diff --git a/test/chain-specific-spokepools/Polygon_SpokePool.ts b/test/chain-specific-spokepools/Polygon_SpokePool.ts index dc59f619..32407b79 100644 --- a/test/chain-specific-spokepools/Polygon_SpokePool.ts +++ b/test/chain-specific-spokepools/Polygon_SpokePool.ts @@ -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); @@ -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 diff --git a/test/chain-specific-spokepools/Succinct_SpokePool.ts b/test/chain-specific-spokepools/Succinct_SpokePool.ts index cf6a55fb..5fb158fd 100644 --- a/test/chain-specific-spokepools/Succinct_SpokePool.ts +++ b/test/chain-specific-spokepools/Succinct_SpokePool.ts @@ -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"] } ); });