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

Fix zkEVM blockchains and add Linea blockchains #42

Merged
merged 7 commits into from
Sep 16, 2024
Merged

Conversation

daveroga
Copy link
Contributor

  1. Fix zkevm blockchains

    • Mainnet
      • Blockchain: Polygon
      • NetworkId: Zkevm
      • ChainId: 1101
    • Testnet
      • Blockchain: Polygon
      • NetworkId: Cardona
      • ChainId: 2442
  2. Add Linea blockchains

    • Mainnet
      • Blockchain: Linea
      • NetworkId: Main
      • ChainId: 59144
    • Testnet
      • Blockchain: Linea
      • NetworkId: Sepolia
      • ChainId: 59141

@daveroga daveroga changed the title fix zkevm cardona and add linea blockchains Fix zkevm cardona and add linea blockchains Sep 16, 2024
@daveroga daveroga changed the title Fix zkevm cardona and add linea blockchains Fix zkEVM Cardona and add Linea blockchains Sep 16, 2024
@daveroga daveroga changed the title Fix zkEVM Cardona and add Linea blockchains Fix zkEVM blockchains and add Linea blockchains Sep 16, 2024
src/constants.ts Outdated
@@ -97,13 +101,15 @@ const blockchainNetworkMap = {
[`${Blockchain.Polygon}:${NetworkId.Main}`]: 0b0001_0000 | 0b0000_0001,
[`${Blockchain.Polygon}:${NetworkId.Mumbai}`]: 0b0001_0000 | 0b0000_0010,
[`${Blockchain.Polygon}:${NetworkId.Amoy}`]: 0b0001_0000 | 0b0000_0011,
[`${Blockchain.Polygon}:${NetworkId.Zkevm}`]: 0b0011_0000 | 0b0000_0001,
Copy link
Contributor

Choose a reason for hiding this comment

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

we shouldn't change Blockchain bytes, for Polygon it's 0b0001_0000, you need to change NetworkId flag

Copy link
Contributor

Choose a reason for hiding this comment

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

Or we shouldn't change networkFlag to not break anything ?
CC @vmidyllic

Copy link
Contributor

Choose a reason for hiding this comment

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

we could set it like this 0b0001_0000 | 0b0010_0001,

so first 4 bits would be the same as other Polygon and in netwrok we will keep final version of networkFlag as it was

Copy link
Member

@OBrezhniev OBrezhniev Sep 16, 2024

Choose a reason for hiding this comment

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

Values should match golang ones:

	{Blockchain: Polygon, NetworkID: Zkevm}:   0b0001_0000 | 0b0000_0100,
	{Blockchain: Polygon, NetworkID: Cardona}: 0b0001_0000 | 0b0000_0101,

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@daveroga daveroga merged commit ccf6422 into main Sep 16, 2024
2 checks passed
@daveroga daveroga deleted the fix/zkevm-cardona branch September 16, 2024 15:07
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.

3 participants