Skip to content

Conversation

@mrice32
Copy link
Contributor

@mrice32 mrice32 commented Aug 4, 2023

This PR introduces a few various changes to support base:

  • New contracts for base. Note: these are only name changes. The adapter is identical to the Boba_Adapter. The spoke pool is identical to the Optimism_SpokePool. I created new contracts with new names just in case we wanted to modify them without affecting the original in a future upgrade. Open to other opinions here, though.
  • New deployment scripts for Base along with constants for mainnet and goerli.
  • New base deployed contract addresses in the deployments folder.
  • Base configuration in the hardhat config file.

Unrelated to Base, this PR also updates the outdated SpokePool addresses in the deployments folder. Many of these were still pointing to the old SpokePool addresses from a few months ago.

mrice32 added 4 commits August 4, 2023 16:12
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 marked this pull request as ready for review August 4, 2023 21:28
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@@ -0,0 +1,31 @@
// SPDX-License-Identifier: BUSL-1.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an exact copy of Optimism_SpokePool.sol, only the name has been changed.

@@ -0,0 +1,83 @@
// SPDX-License-Identifier: BUSL-1.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an exact copy of the Boba_Adapter. Only the name has been changed.

@@ -0,0 +1,28 @@
import { ethers } from "ethers";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lightly modified version of the Optimism adapter deployment script.

@@ -0,0 +1,17 @@
import { deployNewProxy } from "../utils/utils.hre";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lightly modified Optimism spoke pool deployment script.

@@ -0,0 +1,1620 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't generated for some reason during deployment (I think the proxies don't generate these files for some reason), so i just copied the optimism auto-generated file. No need to review this.

@@ -1,5 +1,5 @@
{
"address": "0x4D9079Bb4165aeb4084c526a32695dCfd2F77381",
"address": "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this address because it was outdated, and wanted to make sure that we didn't accidentally interact with the outdated address.

@@ -1,5 +1,5 @@
{
"address": "0xa420b2d1c0841415A695b81E5B867BCD07Dff8C9",
"address": "0x6f26Bf09B1C792e3228e5467807a900A503c0281",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, updated this so we don't accidentally send transactions to the old address.

@@ -1,5 +1,5 @@
{
"address": "0x69B5c72837769eF1e7C164Abc6515DcFf217F920",
"address": "0x9295ee1d8C5b022Be115A2AD3c30C72E34e7F096",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, updated this so we don't accidentally send transactions to the old address.


const proxy = await upgrades.deployProxy(await getContractFactory(name, {}), args, {
kind: "uups",
unsafeAllow: ["delegatecall"],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to deploy without this, so I left it in. @nicholaspai is there somewhere else this should be specified or is this correct?

Copy link
Contributor

@pxrl pxrl Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I hit the same issue on zkSync. It seems like we are importing AddressUpgradeable.sol via Initializable.sol. @nicholaspai found that the import was recently removed, so it's no longer there on master. Hopefully we can remove this suppression after updating the dependency.

OpenZeppelin/openzeppelin-contracts-upgradeable@15bc824

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it depends on a new OZ NPM package unfortunately

"contracts/HubPool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Boba_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Optimism_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
"contracts/Base_SpokePool.sol": LARGE_CONTRACT_COMPILER_SETTINGS,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few bits of config to the hh config in order to support base and its contracts.

@mrice32 mrice32 merged commit 30f83f5 into master Aug 10, 2023
@mrice32 mrice32 deleted the base branch August 10, 2023 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants