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

chore(eth-multisig-v4): add arbeth and opeth config #112

Merged
merged 1 commit into from
Nov 27, 2023
Merged
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
12 changes: 9 additions & 3 deletions .github/workflows/deploy_and_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }}
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }}
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }}
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }}
OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }}
get-network:
runs-on: ubuntu-latest
needs: [lint-and-test]
Expand All @@ -38,13 +40,13 @@ jobs:
result-encoding: string
script: |
const tag = process.env.GITHUB_REF_NAME;
const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc)$/;
const regex = /v.*\-(eth|hteth|matic|tmatic|bsc|tbsc|arbeth|tarbeth|opeth|topeth)$/;
const network = tag.match(regex);
return network ? network[1] : "hteth";
deploy-to-test:
runs-on: ubuntu-latest
needs: [lint-and-test, get-network]
if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) }}
if: ${{ (needs.get-network.outputs.network == 'hteth' ) || (needs.get-network.outputs.network == 'tmatic' ) || (needs.get-network.outputs.network == 'tbsc' ) || (needs.get-network.outputs.network == 'tarbeth' ) || (needs.get-network.outputs.network == 'topeth' ) }}
environment: testnet
steps:
- uses: actions/checkout@v2
Expand All @@ -64,6 +66,8 @@ jobs:
ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }}
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }}
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }}
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }}
OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }}
- name: Update release notes
uses: actions/github-script@v6
with:
Expand Down Expand Up @@ -95,7 +99,7 @@ jobs:
deploy-to-prod:
runs-on: ubuntu-latest
needs: [lint-and-test, get-network]
if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) }}
if: ${{ (needs.get-network.outputs.network == 'eth' ) || (needs.get-network.outputs.network == 'matic' ) || (needs.get-network.outputs.network == 'bsc' ) || (needs.get-network.outputs.network == 'arbeth' ) || (needs.get-network.outputs.network == 'opeth' ) }}
environment: mainnet
steps:
- uses: actions/checkout@v2
Expand All @@ -115,6 +119,8 @@ jobs:
ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }}
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }}
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }}
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }}
OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }}
- name: Update release notes
uses: actions/github-script@v6
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ jobs:
ALCHEMY_POLYGON_API_KEY: ${{ secrets.ALCHEMY_POLYGON_API_KEY }}
POLYGONSCAN_API_KEY: ${{ secrets.POLYGONSCAN_API_KEY }}
BSCSCAN_API_KEY: ${{ secrets.BSCSCAN_API_KEY }}
ARBISCAN_API_KEY: ${{ secrets.ARBISCAN_API_KEY }}
OPTIMISTIC_ETHERSCAN_API_KEY: ${{ secrets.OPTIMISTIC_ETHERSCAN_API_KEY }}
- run: npm run lint
51 changes: 48 additions & 3 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ const {
TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT,
QUICKNODE_ETH_MAINNET_API_KEY,
QUICKNODE_ETH_HOLESKY_API_KEY,
QUICKNODE_ARBITRUM_SEPOLIA_API_KEY,
QUICKNODE_OPTIMISM_SEPOLIA_API_KEY,
ETHERSCAN_API_KEY,
ALCHEMY_POLYGON_API_KEY,
POLYGONSCAN_API_KEY,
BSCSCAN_API_KEY
BSCSCAN_API_KEY,
ARBISCAN_API_KEY,
OPTIMISTIC_ETHERSCAN_API_KEY
} = process.env;

const config: HardhatUserConfig = {
Expand Down Expand Up @@ -66,6 +70,14 @@ const config: HardhatUserConfig = {
tbsc: {
url: `https://data-seed-prebsc-1-s1.binance.org:8545/`,
accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`]
},
tarbeth: {
url: `${QUICKNODE_ARBITRUM_SEPOLIA_API_KEY}`,
accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`]
},
topeth: {
url: `${QUICKNODE_OPTIMISM_SEPOLIA_API_KEY}`,
accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`]
}
},
gasReporter: {
Expand All @@ -77,12 +89,45 @@ const config: HardhatUserConfig = {
//ethereum
mainnet: `${ETHERSCAN_API_KEY}`,
goerli: `${ETHERSCAN_API_KEY}`,
holesky: `${ETHERSCAN_API_KEY}`,
//polygon
polygon: `${POLYGONSCAN_API_KEY}`,
polygonMumbai: `${POLYGONSCAN_API_KEY}`,
bscTestnet: `${BSCSCAN_API_KEY}`,
bsc: `${BSCSCAN_API_KEY}`
}
bsc: `${BSCSCAN_API_KEY}`,
// arbitrum
arbitrumOne: `${ARBISCAN_API_KEY}`,
arbitrumSepolia: `${ARBISCAN_API_KEY}`,
// optimism
optimisticEthereum: `${OPTIMISTIC_ETHERSCAN_API_KEY}`,
optimisticSepolia: `${OPTIMISTIC_ETHERSCAN_API_KEY}`
},
customChains: [
{
network: 'holesky',
chainId: 17000,
urls: {
apiURL: 'https://api-holesky.etherscan.io/api',
browserURL: 'https://holesky.etherscan.io'
}
},
{
network: 'arbitrumSepolia',
chainId: 421614,
urls: {
apiURL: 'https://api-sepolia.arbiscan.io/api',
browserURL: 'https://sepolia.arbiscan.io'
}
},
{
network: 'optimisticSepolia',
chainId: 11155420,
urls: {
apiURL: 'https://api-sepolia-optimistic.etherscan.io/api',
browserURL: 'https://sepolia-optimism.etherscan.io'
}
}
]
},
mocha: {
timeout: 100000
Expand Down
20 changes: 18 additions & 2 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function main() {
//eth
case 1:
//hteth
case 5:
case 17000:
walletImplementationContractName = 'WalletSimple';
break;
//matic
Expand All @@ -36,6 +36,18 @@ async function main() {
walletImplementationContractName = 'RecoveryWalletSimple';
walletFactoryContractName = 'RecoveryWalletFactory';
break;
// arbeth
case 42161:
// tarbeth
case 421614:
walletImplementationContractName = 'ArbethWalletSimple';
break;
// opeth
case 10:
// topeth
case 11155420:
walletImplementationContractName = 'OpethWalletSimple';
break;
}

console.log(
Expand Down Expand Up @@ -83,7 +95,11 @@ async function main() {
await forwarderFactory.deployTransaction.wait(10);

console.log('Done waiting, verifying');
await verifyContract('WalletSimple', walletSimple.address, []);
await verifyContract(
walletImplementationContractName,
walletSimple.address,
[]
);
await verifyContract('WalletFactory', walletFactory.address, [
walletSimple.address
]);
Expand Down
Loading