Skip to content

Commit

Permalink
chore: Migrate the governance to Linea (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
alainncls authored Jun 4, 2024
1 parent 19fbace commit a49d399
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 13,311 deletions.
3 changes: 3 additions & 0 deletions governance/.env.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PRIVATE_KEY=
LINEASCAN_API_KEY=
CONTRACT_OWNER=
23 changes: 14 additions & 9 deletions governance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ governance.

This is a JavaScript HardHat project that uses OpenZeppellin contracts as a dependency.

The following tasks are valid:
## Usage

```shell
npx hardhat help
```
# 1. Set-up
npm install
cp .env.template .env # and fill the document
# 2. Test
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts
npx hardhat run scripts/deployProxy.ts --network arbitrum_one
npx hardhat verify --network arbitrum_one [PROXY_ADDRESS]
npx hardhat run scripts/upgrade.ts --network arbitrum_one
# 3. Deploy
npx hardhat run scripts/deploy.ts --network NETWORK_NAME
npx hardhat run scripts/deployProxy.ts --network NETWORK_NAME
# 4. Upgrade (if needed)
npx hardhat run scripts/upgrade.ts --network NETWORK_NAME
```
18 changes: 13 additions & 5 deletions governance/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import dotenv from "dotenv";

dotenv.config({ path: "./.env" });

const { PRIVATE_KEY, LINEASCAN_API_KEY, ARBITRUM_MAINNET_PRIVATE_KEY, ARBITRUM_API_KEY } = process.env;
const { PRIVATE_KEY, LINEASCAN_API_KEY } = process.env;

const config: HardhatUserConfig = {
solidity: {
Expand All @@ -21,15 +21,15 @@ const config: HardhatUserConfig = {
url: `https://rpc.goerli.linea.build/`,
accounts: [PRIVATE_KEY ?? ""],
},
arbitrum_one: {
url: "https://arb1.arbitrum.io/rpc",
accounts: [ARBITRUM_MAINNET_PRIVATE_KEY ?? ""],
linea: {
url: `https://rpc.linea.build/`,
accounts: [PRIVATE_KEY ?? ""],
},
},
etherscan: {
apiKey: {
linea_testnet: LINEASCAN_API_KEY ?? "",
arbitrumOne: ARBITRUM_API_KEY ?? "",
linea: LINEASCAN_API_KEY ?? "",
},
customChains: [
{
Expand All @@ -40,6 +40,14 @@ const config: HardhatUserConfig = {
browserURL: "https://goerli.lineascan.build/address",
},
},
{
network: "linea",
chainId: 59144,
urls: {
apiURL: "https://api.lineascan.build/api",
browserURL: "https://lineascan.build/address",
},
},
],
},
};
Expand Down
Loading

0 comments on commit a49d399

Please sign in to comment.