Skip to content
Open
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
5 changes: 5 additions & 0 deletions cli-typescript/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export enum SUPPORTED_CHAINS {
ABSTRACT = 2741,
BERACHAIN = 80094,
MONAD_TESTNET = 10143,
MEGAETH_TESTNET = 6342,
}

export const supportedChainNames: { [key in SUPPORTED_CHAINS]: string } = {
Expand All @@ -88,6 +89,7 @@ export const supportedChainNames: { [key in SUPPORTED_CHAINS]: string } = {
[SUPPORTED_CHAINS.ABSTRACT]: 'abstract',
[SUPPORTED_CHAINS.BERACHAIN]: 'berachain',
[SUPPORTED_CHAINS.MONAD_TESTNET]: 'monadTestnet',
[SUPPORTED_CHAINS.MEGAETH_TESTNET]: 'megaethTestnet',
};

export const rpcUrls: { [chainId in SUPPORTED_CHAINS]: string } = {
Expand All @@ -113,6 +115,8 @@ export const rpcUrls: { [chainId in SUPPORTED_CHAINS]: string } = {
'https://evm-router.magiceden.io/monad/testnet/me2024', // Monad Testnet
[SUPPORTED_CHAINS.AVALANCHE]:
'https://evm-router.magiceden.io/avalanche/mainnet/me2024', // Avalanche
[SUPPORTED_CHAINS.MEGAETH_TESTNET]:
'https://evm-router.magiceden.io/megaeth/testnet/me2024', // MegaETH Testnet
};

export const explorerUrls: { [chainId in SUPPORTED_CHAINS]: string } = {
Expand All @@ -128,6 +132,7 @@ export const explorerUrls: { [chainId in SUPPORTED_CHAINS]: string } = {
[SUPPORTED_CHAINS.BERACHAIN]: 'https://berascan.com', // Berachain
[SUPPORTED_CHAINS.MONAD_TESTNET]: 'https://testnet.monadexplorer.com', // Monad Testnet
[SUPPORTED_CHAINS.AVALANCHE]: 'https://subnets.avax.network/', // Avalanche
[SUPPORTED_CHAINS.MEGAETH_TESTNET]: 'https://megaexplorer.xyz', // MegaETH Testnet
};

export const DEFAULT_TOKEN_URI_SUFFIX = '.json';
Expand Down
1 change: 1 addition & 0 deletions cli/cmds/const
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ SUPPORTED_CHAINS=(
"2741:Abstract"
"80094:Berachain"
"10143:MonadTestnet"
"6342:MegaETHTestnet"
)

MAGIC_DROP_KEYSTORE="MAGIC_DROP_KEYSTORE"
Expand Down
3 changes: 3 additions & 0 deletions cli/cmds/utils
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ set_rpc_url() {
80094) RPC_URL="https://rpc.berachain.com" ;; # Berachain
10143) RPC_URL="https://testnet-rpc.monad.xyz" ;; # Monad Testnet
43114) RPC_URL="https://api.avax.network/ext/bc/C/rpc" ;; # Avalanche
6342) RPC_URL="https://carrot.megaeth.com/rpc" ;; # MegaETH Testnet
*) echo "Unsupported chain id"; exit 1 ;;
esac

Expand All @@ -39,6 +40,7 @@ chain_id_to_symbol() {
80094) echo "BERA" ;;
10143) echo "MON" ;;
43114) echo "AVAX" ;;
6342) echo "ETH" ;;
*) echo "Unknown" ;;
esac
}
Expand All @@ -58,6 +60,7 @@ chain_id_to_explorer_url() {
80094) echo "https://berascan.com" ;;
10143) echo "https://testnet.monadexplorer.com" ;;
43114) echo "https://snowtrace.io" ;;
6342) echo "https://megaexplorer.xyz" ;;
*) echo "Unknown" ;;
esac
}
Expand Down
13 changes: 13 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ const config: HardhatUserConfig = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
megaeth_testnet: {
url: process.env.MEGAETH_TESTNET_URL || 'https://carrot.megaeth.com/rpc',
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
Expand Down Expand Up @@ -175,6 +180,14 @@ const config: HardhatUserConfig = {
browserURL: 'https://snowtrace.io/'
},
},
{
network: 'megaeth_testnet',
chainId: 6342,
urls: {
apiURL: 'https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/megaeth-testnet',
browserURL: 'https://megaexplorer.xyz/'
},
},
]
},
sourcify: {
Expand Down
1 change: 1 addition & 0 deletions scripts-foundry/common/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ VERIFICATION_API_KEY_BERACHAIN=
VERIFICATION_API_KEY_MONAD_TESTNET=
VERIFICATION_API_KEY_ABSTRACT=
VERIFICATION_API_KEY_AVALANCHE=
VERIFICATION_API_KEY_MEGAETH_TESTNET=

# Deployment Configuration
PRIVATE_KEY=
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ $ZK_SYNC ]; then
usage
fi
else
if [ -z "$CHAIN_ID" ] || [ -z "$REGISTRY_SALT" ] || [ -z "$REGISTRY_EXPECTED_ADDRESS"]; then
if [ -z "$CHAIN_ID" ] || [ -z "$REGISTRY_SALT" ] || [ -z "$REGISTRY_EXPECTED_ADDRESS" ]; then
usage
fi
fi
Expand Down
3 changes: 2 additions & 1 deletion scripts-foundry/common/utils
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ set_rpc_url() {
80094) RPC_URL="https://rpc.berachain.com" ;; # Berachain
10143) RPC_URL="https://testnet-rpc2.monad.xyz/f8146cc42d8671ba15204cff0e3608faf370d983" ;; # Monad Testnet
2741) RPC_URL="https://api.mainnet.abs.xyz" ;; # Abstract
6342) RPC_URL="https://carrot.megaeth.com/rpc" ;; # MegaETH Testnet
*) echo "Unsupported chain id"; exit 1 ;;
esac

Expand All @@ -34,7 +35,7 @@ set_etherscan_api_key() {
80094) ETHERSCAN_API_KEY=$VERIFICATION_API_KEY_BERACHAIN ;;
10143) ETHERSCAN_API_KEY=$VERIFICATION_API_KEY_MONAD_TESTNET ;;
2741) ETHERSCAN_API_KEY=$VERIFICATION_API_KEY_ABSTRACT ;;
43114) ETHERSCAN_API_KEY=$VERIFICATION_API_KEY_AVALANCHE ;;
6342) ETHERSCAN_API_KEY=$VERIFICATION_API_KEY_MEGAETH_TESTNET ;;
*) echo "Unsupported chain id"; exit 1 ;;
esac

Expand Down
Loading