Skip to content

Commit

Permalink
Add Linea mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Oct 9, 2023
1 parent c55910e commit f3a6fa8
Show file tree
Hide file tree
Showing 6 changed files with 225 additions and 0 deletions.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/starksheet-solidity/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ eth_rpc_url = "docker"

[rpc_endpoints]
mainnet = "https://mainnet.infura.io/v3/${INFURA_KEY}"
linea = "https://linea-mainnet.infura.io/v3/${INFURA_KEY}"
goerli = "https://goerli.infura.io/v3/${INFURA_KEY}"
sepolia = "https://sepolia.infura.io/v3/${INFURA_KEY}"
polygon-mainnet = "https://polygon-mainnet.infura.io/v3/${INFURA_KEY}"
Expand Down
3 changes: 3 additions & 0 deletions packages/starksheet-webapp/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ environment = { REACT_APP_NETWORK = "mainnet" }
[context.optimism]
environment = { REACT_APP_NETWORK = "optimismMainnet" }

[context.linea]
environment = { REACT_APP_NETWORK = "linea" }

[context.testnet]
environment = { REACT_APP_NETWORK = "testnet" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const evmsheetDeploymentsFolder = path.join(
const evmChains = {
5: "goerli",
10: "optimismMainnet",
59144: "linea",
31337: "anvil",
1263227476: "kakarot",
};
Expand Down
11 changes: 11 additions & 0 deletions packages/starksheet-webapp/src/provider/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { StarknetProvider } from "./StarknetProvider";
type SupportedChains =
| "goerli"
| "optimismMainnet"
| "linea"
| "anvil"
| "mainnet"
| "testnet"
Expand Down Expand Up @@ -39,6 +40,16 @@ const chainConfigs: Record<SupportedChains, Omit<ChainConfig, "addresses">> = {
nftBaseUrl: "https://wenmoon.market/collection/optimism/",
rpcUrl: `https://optimism-mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`,
},
linea: {
appName: "Lineasheet",
chainId: ChainId.LINEA_MAINNET,
chainType: ChainType.EVM,
explorerBaseUrl: "https://lineascan.build/address/",
explorerApiUrl: "https://api.lineascan.build/api",
explorerApiKey: `${process.env.REACT_APP_LINEA_EXPLORER_KEY}`,
nftBaseUrl: "https://element.market/assets/linea/",
rpcUrl: `https://linea-mainnet.infura.io/v3/${process.env.REACT_APP_INFURA_KEY}`,
},
anvil: {
appName: "Ethsheet",
chainId: ChainId.ANVIL,
Expand Down
1 change: 1 addition & 0 deletions packages/starksheet-webapp/src/types/provider/ChainId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export enum ChainId {
ETHEREUM_MAINNET = "0x1",
ETHEREUM_TESTNET = "0x5",
OPTIMISM_MAINNET = "0xa",
LINEA_MAINNET = "0xe708",
ANVIL = "0x7a69",
STARKNET_MAINNET = "0x534e5f4d41494e",
STARKNET_TESTNET = "0x534e5f474f45524c49",
Expand Down

0 comments on commit f3a6fa8

Please sign in to comment.