Skip to content

Commit

Permalink
Add Linea Goerli support
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder committed Sep 5, 2023
1 parent cc2b27c commit 30f3c62
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 18 deletions.
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ETHEREUM_SEPOLIA_PROVIDER_URL=
ETHEREUM_OPTIMISM_GOERLI_PROVIDER_URL=
ETHEREUM_BASE_GOERLI_PROVIDER_URL=
ETHEREUM_ARBITRUM_GOERLI_PROVIDER_URL=
ETHEREUM_LINEA_GOERLI_PROVIDER_URL=
ETHERSCAN_API_KEY=
MAX_FEE=
MAX_PRIORITY_FEE=
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ deployments/sepolia/solcInputs/*
deployments/optimism-goerli/solcInputs/*
deployments/base-goerli/solcInputs/*
deployments/arbitrum-goerli/solcInputs/*
deployments/linea-goerli/solcInputs/*
deployments/hardhat/*

.coverage_artifacts
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,6 @@ Version v1.0.1:
* Contract: [0x4200000000000000000000000000000000000020](https://optimistic.etherscan.io/address/0x4200000000000000000000000000000000000020)
* Deployment and ABI: [SchemaRegistry.json](./deployments/optimism/SchemaRegistry.json)

#### Linea

Version v1.2.0:

* **EAS**:
* Contract: [0x4200000000000000000000000000000000000021](https://lineascan.build//address/0x4200000000000000000000000000000000000021)
* Deployment and ABI: [EAS.json](./deployments/linea/EAS.json)
* **SchemaRegistry**:
* Contract: [0x4200000000000000000000000000000000000020](https://lineascan.build//address/0x4200000000000000000000000000000000000020)
* Deployment and ABI: [SchemaRegistry.json](./deployments/linea/SchemaRegistry.json)

### Testnets

#### Sepolia
Expand Down Expand Up @@ -113,23 +102,34 @@ Version v1.0.1:
Version v0.27:

* **EAS**:
* Contract: [0xAcfE09Fd03f7812F022FBf636700AdEA18Fd2A7A](https://goerli.basescan.org//address/0xAcfE09Fd03f7812F022FBf636700AdEA18Fd2A7A)
* Contract: [0xAcfE09Fd03f7812F022FBf636700AdEA18Fd2A7A](https://goerli.basescan.org/address/0xAcfE09Fd03f7812F022FBf636700AdEA18Fd2A7A)
* Deployment and ABI: [EAS.json](./deployments/base-goerli/EAS.json)
* **SchemaRegistry**:
* Contract: [0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E](https://goerli.basescan.org//address/0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E)
* Contract: [0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E](https://goerli.basescan.org/address/0x720c2bA66D19A725143FBf5fDC5b4ADA2742682E)
* Deployment and ABI: [SchemaRegistry.json](./deployments/base-goerli/SchemaRegistry.json)

#### Arbitrum Goerli

Version v1.1.0:

* **EAS**:
* Contract: [0xaEF4103A04090071165F78D45D83A0C0782c2B2a](https:/goerli.arbiscan.io//address/0xaEF4103A04090071165F78D45D83A0C0782c2B2a)
* Contract: [0xaEF4103A04090071165F78D45D83A0C0782c2B2a](https:/goerli.arbiscan.io/address/0xaEF4103A04090071165F78D45D83A0C0782c2B2a)
* Deployment and ABI: [EAS.json](./deployments/arbitrum-goerli/EAS.json)
* **SchemaRegistry**:
* Contract: [0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797](https:/goerli.arbiscan.io//address/0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797)
* Contract: [0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797](https:/goerli.arbiscan.io/address/0x55D26f9ae0203EF95494AE4C170eD35f4Cf77797)
* Deployment and ABI: [SchemaRegistry.json](./deployments/arbitrum-goerli/SchemaRegistry.json)

#### Linea Goerli

Version v1.2.0:

* **EAS**:
* Contract: [0x4200000000000000000000000000000000000021](https://goerli.lineascan.build/address/0x4200000000000000000000000000000000000021)
* Deployment and ABI: [EAS.json](./deployments/linea-goerli/EAS.json)
* **SchemaRegistry**:
* Contract: [0x4200000000000000000000000000000000000020](https://goerli.lineascan.build/address/0x4200000000000000000000000000000000000020)
* Deployment and ABI: [SchemaRegistry.json](./deployments/linea-goerli/SchemaRegistry.json)

## Installation

```sh
Expand Down
5 changes: 5 additions & 0 deletions data/NamedAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const arbitrumGoerli = (address: string) => ({
[DeploymentNetwork.ArbitrumGoerli]: address
});

const lineaGoerli = (address: string) => ({
[DeploymentNetwork.LineaGoerli]: address
});

export const NamedAccounts = {
deployer: {
...mainnet(deployer),
Expand All @@ -50,5 +54,6 @@ export const NamedAccounts = {
...optimismGoerli(deployer),
...baseGoerli(deployer),
...arbitrumGoerli(deployer)
...lineaGoerli(deployer)
}
};
10 changes: 9 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface EnvOptions {
ETHEREUM_OPTIMISM_GOERLI_PROVIDER_URL?: string;
ETHEREUM_BASE_GOERLI_PROVIDER_URL?: string;
ETHEREUM_ARBITRUM_GOERLI_PROVIDER_URL?: string;
ETHEREUM_LINEA_GOERLI_PROVIDER_URL?: string;
ETHERSCAN_API_KEY?: string;
PROFILE?: boolean;
}
Expand All @@ -31,6 +32,7 @@ const {
ETHEREUM_OPTIMISM_GOERLI_PROVIDER_URL = '',
ETHEREUM_BASE_GOERLI_PROVIDER_URL = '',
ETHEREUM_ARBITRUM_GOERLI_PROVIDER_URL = '',
ETHEREUM_LINEA_GOERLI_PROVIDER_URL = '',
ETHERSCAN_API_KEY,
PROFILE: isProfiling
}: EnvOptions = process.env as any as EnvOptions;
Expand Down Expand Up @@ -112,7 +114,13 @@ const config: HardhatUserConfig = {
url: ETHEREUM_ARBITRUM_GOERLI_PROVIDER_URL,
saveDeployments: true,
live: true
}
},
[DeploymentNetwork.LineaGoerli]: {
chainId: 59140,
url: ETHEREUM_LINEA_GOERLI_PROVIDER_URL,
saveDeployments: true,
live: true
},
},

paths: {
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"/deployments/sepolia/**/*",
"/deployments/optimism-goerli/**/*",
"/deployments/base-goerli/**/*",
"/deployments/arbitrum-goerli/**/*"
"/deployments/arbitrum-goerli/**/*",
"/deployments/linea-goerli/**/*"
],
"scripts": {
"compile": "hardhat compile",
Expand All @@ -42,6 +43,7 @@
"deploy:optimism-goerli": "HARDHAT_NETWORK=optimism-goerli hardhat deploy",
"deploy:base-goerli": "HARDHAT_NETWORK=base-goerli hardhat deploy",
"deploy:arbitrum-goerli": "HARDHAT_NETWORK=arbitrum-goerli hardhat deploy",
"deploy:linea-goerli": "HARDHAT_NETWORK=linea-goerli hardhat deploy",
"verify:mainnet": "HARDHAT_NETWORK=mainnet hardhat etherscan-verify --license MIT",
"verify:arbitrum-one": "HARDHAT_NETWORK=arbitrum-one hardhat etherscan-verify --license MIT",
"verify:optimism": "HARDHAT_NETWORK=optimism hardhat etherscan-verify --license MIT --api-url https://api-optimistic.etherscan.io",
Expand All @@ -50,6 +52,7 @@
"verify:optimism-goerli": "HARDHAT_NETWORK=optimism-goerli hardhat etherscan-verify --license MIT --api-url https://api-goerli-optimism.etherscan.io",
"verify:base-goerli": "HARDHAT_NETWORK=base-goerli hardhat etherscan-verify --license MIT --api-url https://api-goerli.basescan.org",
"verify:arbitrum-goerli": "HARDHAT_NETWORK=arbitrum-goerli hardhat etherscan-verify --license MIT",
"verify:linea-goerli": "HARDHAT_NETWORK=linea-goerli hardhat etherscan-verify --license MIT --api-url https://api-testnet.lineascan.build",
"lint": "pnpm lint:sol && pnpm lint:ts",
"lint:sol": "solhint --max-warnings 0 contracts/**/*.sol",
"lint:ts": "pnpm eslint components data deploy test utils",
Expand Down
1 change: 1 addition & 0 deletions utils/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum DeploymentNetwork {
OptimismGoerli = 'optimism-goerli',
BaseGoerli = 'base-goerli',
ArbitrumGoerli = 'arbitrum-goerli',
LineaGoerli = 'linea-goerli',
Hardhat = 'hardhat'
}

Expand Down
3 changes: 2 additions & 1 deletion utils/Deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const isSepolia = () => getNetworkName() === DeploymentNetwork.Sepolia;
export const isOptimismGoerli = () => getNetworkName() === DeploymentNetwork.OptimismGoerli;
export const isBaseGoerli = () => getNetworkName() === DeploymentNetwork.BaseGoerli;
export const isArbitrumGoerli = () => getNetworkName() === DeploymentNetwork.ArbitrumGoerli;
export const isTestnet = () => isSepolia() || isOptimismGoerli() || isBaseGoerli() || isArbitrumGoerli();
export const isLineaGoerli = () => getNetworkName() === DeploymentNetwork.LineaGoerli;
export const isTestnet = () => isSepolia() || isOptimismGoerli() || isBaseGoerli() || isArbitrumGoerli() || isLineaGoerli();
export const isLive = () => isMainnet() || isTestnet();

export const getDeploymentDir = () => {
Expand Down

0 comments on commit 30f3c62

Please sign in to comment.