diff --git a/core/utils/templateMappings.ts b/core/utils/templateMappings.ts index 4127482..71be752 100644 --- a/core/utils/templateMappings.ts +++ b/core/utils/templateMappings.ts @@ -159,6 +159,7 @@ export const buildTemplate = async (appConfig: ConfigType): Promise 'ethereum-sepolia', 'polygon', 'polygon-amoy', + 'etherlink', 'etherlink-testnet', 'zksync', 'zksync-sepolia', diff --git a/scaffolds/nextjs-dedicated-wallet/template/src/utils/network.ts b/scaffolds/nextjs-dedicated-wallet/template/src/utils/network.ts index 240a5bc..3c895f3 100644 --- a/scaffolds/nextjs-dedicated-wallet/template/src/utils/network.ts +++ b/scaffolds/nextjs-dedicated-wallet/template/src/utils/network.ts @@ -3,6 +3,7 @@ export enum Network { POLYGON = 'polygon', ETHEREUM_SEPOLIA = 'ethereum-sepolia', ETHEREUM = 'ethereum', + ETHERLINK = 'etherlink', ETHERLINK_TESTNET = 'etherlink-testnet', ZKSYNC = 'zksync', ZKSYNC_SEPOLIA = 'zksync-sepolia', @@ -18,6 +19,8 @@ export const getNetworkUrl = () => { return 'https://eth-sepolia.g.alchemy.com/v2/fYFybLQFR9Zr2GCRcgALmAktStFKr0i0'; case Network.ETHEREUM: return 'https://eth-mainnet.g.alchemy.com/v2/fYFybLQFR9Zr2GCRcgALmAktStFKr0i0'; + case Network.ETHERLINK: + return 'https://node.mainnet.etherlink.com'; case Network.ETHERLINK_TESTNET: return 'https://node.ghostnet.etherlink.com'; case Network.ZKSYNC: @@ -43,6 +46,8 @@ export const getChainId = () => { return 300; case Network.ETHEREUM: return 1; + case Network.ETHERLINK: + return 42793; case Network.ETHERLINK_TESTNET: return 128123; } @@ -58,6 +63,7 @@ export const getNetworkToken = () => { case Network.ZKSYNC: case Network.ZKSYNC_SEPOLIA: return 'ETH'; + case Network.ETHERLINK: case Network.ETHERLINK_TESTNET: return 'XTZ'; } @@ -86,6 +92,8 @@ export const getNetworkName = () => { return 'Ethereum (Sepolia)'; case Network.ETHEREUM: return 'Ethereum (Mainnet)'; + case Network.ETHERLINK: + return 'Etherlink (Mainnet)'; case Network.ETHERLINK_TESTNET: return 'Etherlink (Testnet)'; case Network.ZKSYNC: @@ -105,8 +113,10 @@ export const getBlockExplorer = (address: string) => { return `https://etherscan.io/address/${address}`; case Network.ETHEREUM_SEPOLIA: return `https://sepolia.etherscan.io/address/${address}`; + case Network.ETHERLINK: + return `https://explorer.etherlink.com/address/${address}`; case Network.ETHERLINK_TESTNET: - return `https://testnet-explorer.etherlink.com//address/${address}`; + return `https://testnet-explorer.etherlink.com/address/${address}`; case Network.ZKSYNC: return `https://explorer.zksync.io/address/${address}`; case Network.ZKSYNC_SEPOLIA: @@ -123,6 +133,7 @@ export const isEip1559Supported = () => { case Network.ZKSYNC_SEPOLIA: case Network.POLYGON: case Network.POLYGON_AMOY: + case Network.ETHERLINK: case Network.ETHERLINK_TESTNET: return false; } diff --git a/scaffolds/prompts.ts b/scaffolds/prompts.ts index 9484d80..bcddd16 100644 --- a/scaffolds/prompts.ts +++ b/scaffolds/prompts.ts @@ -163,6 +163,7 @@ export namespace BlockchainNetworkPrompt { choices: [ { name: 'ethereum', message: 'Ethereum (Mainnet)' }, { name: 'ethereum-sepolia', message: 'Ethereum (Sepolia Testnet)' }, + { name: 'etherlink', message: 'Etherlink (Mainnet)' }, { name: 'etherlink-testnet', message: 'Etherlink (Testnet)' }, { name: 'polygon', message: 'Polygon (Mainnet)' }, { name: 'polygon-amoy', message: 'Polygon (Amoy Testnet)' },