diff --git a/.env.template b/.env.template index 3d3d0997c..6d0774c41 100644 --- a/.env.template +++ b/.env.template @@ -76,6 +76,7 @@ FVM_ENDPOINT=https://filecoin-mainnet.chainstacklabs.com/rpc/v1 CANTO_ENDPOINT=https://canto.slingshot.finance POLYGON_ZK_EVM_ENDPOINT=https://zkevm-rpc.com ANTIMATTER_B2_ENDPOINT=https://rpc.antimatter.finance/ +TELOS_ENDPOINT=https://mainnet.telos.net/evm LINEA_ENDPOINT= LINEA_API_KEY='ABCDEF' diff --git a/hardhat.config.ts b/hardhat.config.ts index ddc9c1957..282eb3ac3 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -234,17 +234,20 @@ const antimatterB2PrivateKey = process.env.ANTIMATTER_B2_PRIVATE_KEY || DEFAULT_ const lineaEndpoint = process.env.LINEA_ENDPOINT || DEFAULT_ENDPOINT; const lineaPrivateKey = process.env.LINEA_PRIVATE_KEY || DEFAULT_PRIVATE_KEY; +const telosEndpoint = process.env.TELOS_ENDPOINT || DEFAULT_ENDPOINT; +const telosPrivateKey = process.env.TELOS_PRIVATE_KEY || DEFAULT_PRIVATE_KEY; + // use kmsKeyId if it's not empty, otherwise use privateKey function getNetworkConfig(url: string, kmsKeyId: string, privateKey: string, gasPrice?: number): NetworkUserConfig { const network: NetworkUserConfig = !kmsKeyId ? { - url: url, - accounts: [`0x${privateKey}`] - } + url: url, + accounts: [`0x${privateKey}`] + } : { - url: url, - kmsKeyId: kmsKeyId - }; + url: url, + kmsKeyId: kmsKeyId + }; if (gasPrice) { network.gasPrice = gasPrice; } @@ -404,7 +407,8 @@ const config: HardhatUserConfig = { canto: getNetworkConfig(cantoEndpoint, kmsKeyId, cantoPrivateKey), polygonZkevm: getNetworkConfig(polygonZkevmEndpoint, kmsKeyId, polygonZkevmPrivateKey), antimatterB2: getNetworkConfig(antimatterB2Endpoint, kmsKeyId, antimatterB2PrivateKey), - linea: getNetworkConfig(lineaEndpoint, kmsKeyId, lineaPrivateKey) + linea: getNetworkConfig(lineaEndpoint, kmsKeyId, lineaPrivateKey), + telos: getNetworkConfig(telosEndpoint, kmsKeyId, telosPrivateKey) }, namedAccounts: { deployer: {