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

feat(config): support base chain #154

Merged
merged 1 commit into from
Aug 14, 2024
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
32 changes: 30 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const {
BSCSCAN_API_KEY,
ARBISCAN_API_KEY,
OPTIMISTIC_ETHERSCAN_API_KEY,
ZKSYNC_EXPLORER_API_KEY
ZKSYNC_EXPLORER_API_KEY,
BASESCAN_API_KEY
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you already added this in the github action workflow file?

} = process.env;

const config: HardhatUserConfig = {
Expand Down Expand Up @@ -121,6 +122,14 @@ const config: HardhatUserConfig = {
tzketh: {
url: `${QUICKNODE_ZKSYNC_SEPOLIA_API_KEY}`,
accounts: [`${PRIVATE_KEY_FOR_V4_CONTRACT_DEPLOYMENT}`]
},
tbaseeth: {
url: 'https://sepolia.base.org',
accounts: [`${TESTNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`]
},
baseeth: {
url: 'https://mainnet.base.org/',
accounts: [`${MAINNET_PRIVATE_KEY_FOR_CONTRACT_DEPLOYMENT}`]
}
},
gasReporter: {
Expand All @@ -146,7 +155,10 @@ const config: HardhatUserConfig = {
optimisticSepolia: `${OPTIMISTIC_ETHERSCAN_API_KEY}`,
// zksync
zksync: `${ZKSYNC_EXPLORER_API_KEY}`,
zksyncSepolia: `${ZKSYNC_EXPLORER_API_KEY}`
zksyncSepolia: `${ZKSYNC_EXPLORER_API_KEY}`,
// base chain
baseSepolia: `${BASESCAN_API_KEY}`,
base: `${BASESCAN_API_KEY}`
},
customChains: [
{
Expand Down Expand Up @@ -196,6 +208,22 @@ const config: HardhatUserConfig = {
apiURL: 'https://api-amoy.polygonscan.com/api',
browserURL: 'https://amoy.polygonscan.com'
}
},
{
network: 'baseSepolia',
chainId: 84532,
urls: {
apiURL: 'https://api-sepolia.basescan.org/api',
browserURL: 'https://sepolia.basescan.org/'
}
},
{
network: 'base',
chainId: 8453,
urls: {
apiURL: 'https://api.basescan.org/api',
browserURL: 'https://basescan.org/'
}
}
]
},
Expand Down
9 changes: 9 additions & 0 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@ async function main() {
walletImplementationContractName = 'ZkethWalletSimple';
contractPath = `contracts/coins/${walletImplementationContractName}.sol:${walletImplementationContractName}`;
break;
// base sepolia
case 84532:
// base
case 8453:
walletImplementationContractName = 'WalletSimple';
forwarderContractName = 'Forwarder';
forwarderFactoryContractName = 'ForwarderFactory';
contractPath = `contracts/${walletImplementationContractName}.sol:${walletImplementationContractName}`;
break;
}

console.log(
Expand Down
Loading