Skip to content

Commit

Permalink
Add Linea (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter authored Oct 9, 2023
1 parent c55910e commit 5c342db
Show file tree
Hide file tree
Showing 8 changed files with 241 additions and 66 deletions.
41 changes: 8 additions & 33 deletions .github/workflows/deployments_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,19 @@ on:
- main

jobs:
merge-mainnet:
merge:
runs-on: ubuntu-latest
permissions: write-all
strategy:
matrix:
branch: [mainnet, optimism, linea, staging]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin mainnet
git checkout mainnet
git fetch origin ${{ matrix.branch }}
git checkout ${{ matrix.branch }}
git reset main --hard
git push origin mainnet -f
merge-optimism-mainnet:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin optimism
git checkout optimism
git reset main --hard
git push origin optimism -f
merge-staging:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin staging
git checkout staging
git reset main --hard
git push origin staging -f
git push origin ${{ matrix.branch }} -f
41 changes: 8 additions & 33 deletions .github/workflows/deployments_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,19 @@ on:
- staging

jobs:
merge-testnet:
merge:
runs-on: ubuntu-latest
permissions: write-all
strategy:
matrix:
branch: [testnet, testnet2, goerli]
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin testnet
git checkout testnet
git fetch origin ${{ matrix.branch }}
git checkout ${{ matrix.branch }}
git reset staging --hard
git push origin testnet -f
merge-testnet2:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin testnet2
git checkout testnet2
git reset staging --hard
git push origin testnet2 -f
merge-goerli:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin goerli
git checkout goerli
git reset staging --hard
git push origin goerli -f
git push origin ${{ matrix.branch }} -f

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 5c342db

Please sign in to comment.