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

Base support #1534

Merged
merged 10 commits into from
Apr 11, 2024
Merged

Base support #1534

merged 10 commits into from
Apr 11, 2024

Conversation

adamgall
Copy link
Member

@adamgall adamgall commented Apr 11, 2024

Closes #1532

Adds Base support

Some cleanup along the way:

  • Remove unused "color" property from NetworkConfig
  • Apply "batching" to all network transports
  • Fix etherscan urls for Base Sepolia
  • Group together subgraph properties in NetworkConfig
  • More explicit ordering of networks in the dropdown, as a property in the network config
  • Simplify developer experience so that new chain support is completely encapsulated in src/providers/NetworkConfig/networks/*
  • Remove redundant (derived) properties from NetworkConfig type

The changes in this PR definitely succumbed to scope creep as I cleaned up the NetworkConfig type, but the updates were all super straightforward and I'm not running into any problems as I test locally

Copy link

netlify bot commented Apr 11, 2024

Deploy Preview for fractal-dev ready!

Name Link
🔨 Latest commit aeb645a
🔍 Latest deploy log https://app.netlify.com/sites/fractal-dev/deploys/6617eceeb958ac000829cd5b
😎 Deploy Preview https://deploy-preview-1534.app.dev.fractalframework.xyz
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@mudrila mudrila left a comment

Choose a reason for hiding this comment

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

LGTM!
Just 1 minor question to make sure all subgraphs are deployed

nativeTokenSymbol: mainnet.nativeCurrency.symbol,
nativeTokenIcon: '/images/coin-icon-eth.svg',
wagmiChain: mainnet,
subgraphChainName: 'mainnet',
subgraph: {
space: 71032,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean we have this subgraph deployed under new space?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yessir
Screenshot 2024-04-11 at 9 34 56 AM
Screenshot 2024-04-11 at 9 35 20 AM

Copy link
Contributor

@mudrila mudrila left a comment

Choose a reason for hiding this comment

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

Few minor suggestions about removing duplicated config. chain and wagmiChain seem to be the same, also name can be derived from chain, as well as nativeTokenSymbol - don't see a reason to keep that configurable unless there's a clear reason why we'll be passing different values there

src/providers/NetworkConfig/networks/baseSepolia.ts Outdated Show resolved Hide resolved
@@ -27,17 +27,23 @@ const CHAIN_ID = 1;
const SAFE_VERSION = '1.3.0';

export const mainnetConfig: NetworkConfig = {
order: 0,
chain: mainnet,
rpcEndpoint: `https://eth-mainnet.g.alchemy.com/v2/${import.meta.env.VITE_APP_ALCHEMY_MAINNET_API_KEY}`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Hell yeah

@@ -27,17 +27,23 @@ const CHAIN_ID = 137;
const SAFE_VERSION = '1.3.0';

export const polygonConfig: NetworkConfig = {
order: 20,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why using tens in order?

Copy link
Member Author

@adamgall adamgall Apr 11, 2024

Choose a reason for hiding this comment

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

Oh no real reason, just so that we "have room" when adding new networks (won't need to re-order all of the other networks).

For example, say we add Optimism next, and want it between Base and Polygon.
Currently Base is 10, Polygon is 20.
We could set the order property in the new Optimism config to 15 and it'll show up where we want it to, without needing to adjust any of the other networks' configs.

src/providers/NetworkConfig/web3-modal.config.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@Da-Colon Da-Colon left a comment

Choose a reason for hiding this comment

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

awesome lgtm, same questions as Kirill

@adamgall adamgall merged commit 8fabb41 into develop Apr 11, 2024
7 checks passed
@adamgall adamgall deleted the base-support branch April 11, 2024 15:42
@adamgall adamgall mentioned this pull request Apr 17, 2024
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.

Create config and infrastructure for Base
3 participants