Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable getting getL2Network via an rpc url #331

Open
roninjin10 opened this issue Sep 5, 2023 · 1 comment
Open

Enable getting getL2Network via an rpc url #331

roninjin10 opened this issue Sep 5, 2023 · 1 comment

Comments

@roninjin10
Copy link

roninjin10 commented Sep 5, 2023

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

@roninjin10
Copy link
Author

The way we are thinking about this at OP is sticking the config at a predeployed address on l2. That way any config can bet fetched from a known address

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

No branches or pull requests

1 participant