-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redeploy in optimism and base in the same address
- Loading branch information
1 parent
a455545
commit 99ad803
Showing
19 changed files
with
133 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,8 @@ logs | |
*.pem | ||
.bin | ||
.latest.json | ||
.docker | ||
.docker | ||
|
||
# Hardhat ignition | ||
build-info | ||
journal.jsonl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
# Councilhaus Contracts | ||
|
||
In order to deploy the contracts, you need to set the following variables: | ||
In order to deploy the contracts, follow the steps below: | ||
|
||
```shell | ||
npx hardhat vars set ALCHEMY_KEY | ||
npx hardhat vars set WALLET_KEY | ||
npx hardhat run scripts/deploy.ts | ||
npx hardhat vars set ALCHEMY_KEY # API key from Alchemy.com | ||
npx hardhat vars set WALLET_KEY # Private key of the wallet that will deploy the contracts | ||
bun run deploy:<network> | ||
``` | ||
|
||
In order to verify the contracts, you need to set the following variables: | ||
In order to verify the contracts, follow the steps below: | ||
|
||
```shell | ||
npx hardhat vars set ETHERSCAN_KEY | ||
npx hardhat vars set ETHERSCAN_KEY_OPTIMISM # API key from optimistic.etherscan.io | ||
# or | ||
npx hardhat vars set ETHERSCAN_KEY_BASE # API key from basescan.org | ||
|
||
npx hardhat verify --network <network> <factoryAddress> 0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08 | ||
npx hardhat verify --network <network> <councilAddress> "Spacing Guild" "SPA" 0x7d342726b69c28d942ad8bfe6ac81b972349d524 0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08 | ||
npx hardhat verify --network <network> <councilAddress> "Spacing Guild" "SPA" <distributionTokenAddress> 0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08 | ||
``` | ||
|
||
In order to deploy the subgraph, follow the steps below: | ||
|
||
```shell | ||
cd subgraph | ||
bun install | ||
nano config/<network>.json # set the correct block number | ||
bun build:<network> | ||
bun deploy:<network> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
contracts/councilhaus/ignition/deployments/chain-10/deployed_addresses.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"CouncilFactory#CouncilFactory": "0xdef306E171B39101cf133747f391E5e1A49C8948", | ||
"CouncilFactory#Council": "0xaBED086b76DD178d7a981fAC412335Bac4E64Dd7" | ||
} |
3 changes: 3 additions & 0 deletions
3
contracts/councilhaus/ignition/deployments/chain-8453/deployed_addresses.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"CouncilFactory#CouncilFactory": "0xdef306E171B39101cf133747f391E5e1A49C8948" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; | ||
|
||
export default buildModule("CouncilFactory", (m) => { | ||
const councilFactory = m.contract("CouncilFactory", [ | ||
"0x6DA13Bde224A05a288748d857b9e7DDEffd1dE08", | ||
]); | ||
|
||
const council = m.call(councilFactory, "createCouncil", [ | ||
{ | ||
councilName: "Spacing Guild", | ||
councilSymbol: "SPA", | ||
councilMembers: [["0xf632ce27ea72dea30d30c1a9700b6b3bceaa05cf", 200]], | ||
grantees: [ | ||
["ENS Wayback Machine", "0x6ea869B6870dd98552B0C7e47dA90702a436358b"], | ||
["Giveth House", "0xB6989F472Bef8931e6Ca882b1f875539b7D5DA19"], | ||
["EVMcrispr", "0xeafFF6dB1965886348657E79195EB6f1A84657eB"], | ||
], | ||
distributionToken: m.getParameter("distributionToken"), | ||
}, | ||
]); | ||
|
||
const councilAddress = m.readEventArgument( | ||
council, | ||
"CouncilCreated", | ||
"council", | ||
); | ||
|
||
const councilContract = m.contractAt("Council", councilAddress); | ||
|
||
return { councilFactory, councilContract }; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"distributionToken": "0x708169c8C87563Ce904E0a7F3BFC1F3b0b767f41" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"distributionToken": "0x7d342726b69c28d942ad8bfe6ac81b972349d524" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"network": "base", | ||
"address": "0xdef306E171B39101cf133747f391E5e1A49C8948", | ||
"startBlock": 20194188 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"network": "optimism", | ||
"address": "0xca0b05c27d6856f450b6abfb7a2d8c9d32164ecf", | ||
"startBlock": 125751727 | ||
"address": "0xdef306E171B39101cf133747f391E5e1A49C8948", | ||
"startBlock": 125789504 | ||
} |
Oops, something went wrong.