Skip to content

Commit

Permalink
chore: work on optimism deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Behzad-rabiei committed Nov 25, 2024
1 parent b9eb820 commit f1267f6
Show file tree
Hide file tree
Showing 14 changed files with 147 additions and 306,869 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ npx hardhat ignition deploy ./ignition/modules/Lock.ts
| 0x548c887A24077e13F17a1cE21B3a24B9c06e3D8d | TogetherCrew Deployer |
| 0x1A486364AEB60Db41108799CfEfFc5dA98B40574 | TogetherCrew Application |
| 0x127D8ed45aF416019dB1D4a39Ad44141A8FF56b2 | TogetherCrew Manager |
| 0xc2539c70de7b24b9124e4e897083ccc72e83c7c7 | TogetherCrew Attester |


## Deployments

Expand All @@ -29,4 +31,10 @@ npx hardhat ignition deploy ./ignition/modules/Lock.ts
// Localhost
RUNNING network -> npx hardhat node
Remove ignition/deployments/chain-31337
Deploy to localhost -> npx hardhat run ./scripts/deploy.ts --network localhost
Deploy to localhost -> npx hardhat run ./scripts/deploy.ts --network localhost

// Network
envs -> npx hardhat vars set PRIVATE_KEY PRIVATE_KEY | npx hardhat vars set PRIVATE_KEY ETHERSCAN_API_KEY (more info: https://hardhat.org/hardhat-runner/docs/guides/configuration-variables)
hardhat.config -> update networks + etherscan
create deploy file (scripts/) for the network + providing wallet addrs + add eas contract addr (https://docs.attest.org/docs/quick--start/contracts#installation)
npx hardhat run .\scripts\deployOptimismSepolia.ts --network optimismSepolia (equals to name in the hardhat.config networks)
23 changes: 22 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ const PRIVATE_KEY = vars.has("PRIVATE_KEY")
const ETHERSCAN_API_KEY = vars.has("ETHERSCAN_API_KEY")
? vars.get("ETHERSCAN_API_KEY")
: "";

const OPTIMISM_ETHERSCAN_API_KEY = vars.has("OPTIMISM_ETHERSCAN_API_KEY")
? vars.get("OPTIMISM_ETHERSCAN_API_KEY")
: "";
const config: HardhatUserConfig = {
solidity: {
version: "0.8.26",
Expand All @@ -25,11 +27,30 @@ const config: HardhatUserConfig = {
accounts: [PRIVATE_KEY],
url: "https://ethereum-sepolia-rpc.publicnode.com",
},
optimismSepolia: {
chainId: 11155420,
accounts: [PRIVATE_KEY],
url: "https://sepolia.optimism.io",
gas: 33333,
gasPrice: 1500000,
gasMultiplier: 1.2,
},
},
etherscan: {
apiKey: {
sepolia: ETHERSCAN_API_KEY,
optimismSepolia: OPTIMISM_ETHERSCAN_API_KEY,
},
customChains: [
{
network: "optimismSepolia",
chainId: 11155420,
urls: {
apiURL: "https://api-sepolia-optimistic.etherscan.io/api",
browserURL: "https://api-sepolia-optimistic.etherscan.io",
},
},
],
},
};

Expand Down

This file was deleted.

Loading

0 comments on commit f1267f6

Please sign in to comment.