OP Stack Chain Registry

May 23, 2023
Closed
Closed
Ecosystem Project
  • Links

What is an Ecosystem Project Idea?

An Ecosystem Project Idea is an idea for a project that someone could build within the Optimism ecosystem. As opposed to an Ecosystem Concept or an Ecosystem Idea, an Ecosystem Project is generally more fleshed out and corresponds to a relatively clear product to be built.

Summary

The OP Stack is the open source software stack that powers the Optimism Collective. A core part of this stack is dedicated to the software for spinning up L2 blockchains like OP Mainnet and Base.

One problem facing the OP Stack today is the ability to easily resolve everything about an OP Stack chain, including contract addresses and chain configuration. All of this information is available within smart contracts on L1, but the missing piece is a smart contract registry that allows chain deployers to register their deployments for easy off-chain discovery. This would simplify much of the existing off-chain infrastructure and code that's currently responsible for this task.

The OP Stack Chain Registry should be a simple smart contract on L1 with the following features:

  • A user should be able to "claim" a deployment name by sending a transaction that includes a string name and an address admin
  • The admin of a given deployment should be able to set keys in a mapping of string names to addresses
  • For simplicity, it should be possible to set multiple names to addresses in the same transaction
  • For simplicity, it should be possible to query multiple addresses by their names in the same call
  • This contract should live in the /periphery folder of the contracts-bedrock package within the Optimism Monorepo
  • A hardhat task should be added to the /tasks folder of the contracts-bedrock package for setting this mapping automatically based on a given deployment folder

Impact

The OP Stack Chain Registry will make it possible to easily query all of the required contracts for a given OP Stack chain deployment. This will significantly reduce the complexity of querying these addresses off-chain.

Resources

  • More Information
  • Tag 1
    Contracts
  • Tag2
    Chain Infra
  • Tag3