Skip to content

Enable getting getL2Network via an rpc url #331

@roninjin10

Description

@roninjin10

A general pattern I think all rollups should land on as we move to a multi rollup world is the ability to get the rollup config on chain. This way you can bootstrap the arbitrum sdk with only the rpc url even if the rollup config hasn't been added to this sdk yet.

e.g.

const l2Network = await getL2NetworkFromRpc(
  l2RpcUrl /** <-- rpc url of target Arbitrum chain */
)

This allows us to more easily make tooling work for all chains without needing to specify the config within the library first or needing to tediously craft your own config

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions