Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve scripts #159

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
# Signer Private Key (signer[0])
SIGNER_PRIVATE_KEY="88888"

# Optimism Mainnet
OPTIMISM_MAINNET_RPC_ENDPOINT_URL="https://mainnet.optimism.io"
OPTIMISM_MAINNET_PRIVATE_KEY="88888"
OP_ETHERSCAN_API_KEY="88888"

# Base Mainnet
BASE_MAINNET_RPC_ENDPOINT_URL="https://mainnet.base.org"
BASE_MAINNET_PRIVATE_KEY="88888"
BASE_ETHERSCAN_API_KEY="88888"

# Arbitrum One Mainnet
ARBITRUM_MAINNET_RPC_ENDPOINT_URL="88888"
ARBITRUM_ETHERSCAN_API_KEY="88888"

# Sepolia
SEPOLIA_RPC_ENDPOINT_URL="https://ethereum-sepolia.publicnode.com"
SEPOLIA_PRIVATE_KEY="88888"
SEPOLIA_RPC_ENDPOINT_URL="88888"
ETHERSCAN_API_KEY="88888"

# OP Sepolia
OP_SEPOLIA_RPC_ENDPOINT_URL="https://sepolia.optimism.io"
OP_SEPOLIA_PRIVATE_KEY="88888"
OP_SEPOLIA_RPC_ENDPOINT_URL="88888"

# Base Sepolia
BASE_SEPOLIA_RPC_ENDPOINT_URL="https://sepolia.base.org"
BASE_SEPOLIA_PRIVATE_KEY="88888"

# Arbitrum Sepolia
ARBITRUM_SEPOLIA_RPC_ENDPOINT_URL="88888"

# Addresses used when running scripts for testing cross-chain scenarios
ALICE="88888"
JUNGLE="88888"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ artifacts

.env*
!.env.template
NOTES.md
NOTES.md
deployments
data.json
48 changes: 23 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,19 @@ Then you can add your DAO in [Tally](https://www.tally.xyz/) and/or spin up your

### Crosschain

Make sure the contracts are deployed from the same account.
Run the `scenario1.sh` bash script:

```bash
pnpm crosschain:sepolia
pnpm crosschain:op-sepolia
```

Your DAO will be deployed on every networks at the same address.

Then you can follow these steps to verify that proofs of `safeMint`, `govBurn`, `setMetadata`, `setManifesto` can be generated on source chain and claimed on foreign chain:

./scenario1.sh
```
pnpm crosschain:sepolia
pnpm crosschain:op-sepolia

npx hardhat run scripts/propose.ts --network sepolia
npx hardhat run scripts/verify-proof.ts --network sepolia
npx hardhat run scripts/claim-membership.ts --network op-sepolia
It will:

npx hardhat run scripts/gov-burn.ts --network sepolia
npx hardhat run scripts/verify-gov-burn-proof.ts --network sepolia
npx hardhat run scripts/claim-gov-burn.ts --network op-sepolia

npx hardhat run scripts/verify-metadata-proof.ts --network sepolia
npx hardhat run scripts/claim-metadata-update.ts --network op-sepolia

npx hardhat run scripts/verify-manifesto-proof.ts --network sepolia
npx hardhat run scripts/claim-manifesto-update.ts --network op-sepolia
```
- Deploy to OP Sepolia
- Deploy to Arbitrum Sepolia
- Submit a proposal and add a member
- Generate a membership proof on OP Sepolia
- Claim that proof on Arbitrum Sepolia

## Security

Expand All @@ -106,9 +90,23 @@ The following functions are `onlyOwner`, and since the NFT contract ownership is
|---------|----------|---------------|
| Optimism Mainnet | 10 | [Documentation](https://docs.optimism.io/chain/networks#op-mainnet) |
| Base Mainnet | 8453 | [Documentation](https://docs.base.org/docs/network-information#base-mainnet) |
| Arbitrum One | 42161 | [Documentation](https://docs.arbitrum.io/welcome/get-started) |
| Sepolia Testnet | 11155111 | [Documentation](https://ethereum.org/nb/developers/docs/networks/#sepolia) |
| OP Sepolia Testnet | 11155420 | [Documentation](https://docs.optimism.io/chain/networks#op-sepolia) |
| Base Sepolia Testnet | 84532 | [Documentation](https://docs.base.org/docs/network-information/#base-testnet-sepolia) |
| Arbitrum Sepolia | 421614 | [Documentation](https://docs.arbitrum.io/welcome/get-started) |

## Contract Verification

| Network | Explorer URL | API URL | API Key Variable |
|---------|--------------|---------|-----------------|
| Optimism | https://optimistic.etherscan.io | https://api-optimistic.etherscan.io/api | OP_ETHERSCAN_API_KEY |
| Base | https://basescan.org | https://api.basescan.org/api | BASE_ETHERSCAN_API_KEY |
| Arbitrum One | https://arbiscan.io | https://api.arbiscan.io/api | ARBITRUM_ETHERSCAN_API_KEY |
| Sepolia | https://sepolia.etherscan.io | https://api-sepolia.etherscan.io/api | ETHERSCAN_API_KEY |
| OP Sepolia | https://sepolia-optimism.etherscan.io | https://api-sepolia-optimistic.etherscan.io/api | OP_ETHERSCAN_API_KEY |
| Base Sepolia | https://sepolia.basescan.org | https://api-sepolia.basescan.org/api | BASE_ETHERSCAN_API_KEY |
| Arbitrum Sepolia | https://sepolia.arbiscan.io | https://api-sepolia.arbiscan.io/api | ARBITRUM_ETHERSCAN_API_KEY |

## Core Dependencies

Expand All @@ -120,4 +118,4 @@ The following functions are `onlyOwner`, and since the NFT contract ownership is

## Support

Feel free to reach out to [Julien](https://github.com/julienbrg): [Farcaster](https://warpcast.com/julien-), [Element](https://matrix.to/#/@julienbrg:matrix.org), [Status](https://status.app/u/iwSACggKBkp1bGllbgM=#zQ3shmh1sbvE6qrGotuyNQB22XU5jTrZ2HFC8bA56d5kTS2fy), [Telegram](https://t.me/julienbrg), [Twitter](https://twitter.com/julienbrg), [Discord](https://discordapp.com/users/julienbrg), or [LinkedIn](https://www.linkedin.com/in/julienberanger/).
Feel free to reach out to [Julien](https://github.com/julienbrg) on [Farcaster](https://warpcast.com/julien-), [Element](https://matrix.to/#/@julienbrg:matrix.org), [Status](https://status.app/u/iwSACggKBkp1bGllbgM=#zQ3shmh1sbvE6qrGotuyNQB22XU5jTrZ2HFC8bA56d5kTS2fy), [Telegram](https://t.me/julienbrg), [Twitter](https://twitter.com/julienbrg), [Discord](https://discordapp.com/users/julienbrg), or [LinkedIn](https://www.linkedin.com/in/julienberanger/).
Loading