add RSK networks

This commit is contained in:
hueso
2024-02-13 13:26:39 -03:00
parent e95828b7dd
commit db7407e299
4 changed files with 40 additions and 22 deletions

View File

@@ -37,6 +37,8 @@ const chainIds = {
sepolia: 11155111,
goerli: 5,
"polygon-mumbai": 80001,
rootstock:30,
rsktestnet:31,
};
function getChainConfig(
@@ -49,6 +51,12 @@ function getChainConfig(
"https://polygon-mumbai.g.alchemy.com/v2/" +
alchemyApiKey;
break;
case "rsktestnet":
jsonRpcUrl = "https://public-node.testnet.rsk.co/";
break;
case "rootstock":
jsonRpcUrl = "https://public-node.rsk.co/"
break;
default:
jsonRpcUrl =
"https://" + chain + ".infura.io/v3/" + infuraApiKey;
@@ -103,6 +111,8 @@ const config: HardhatUserConfig = {
goerli: getChainConfig("goerli"),
sepolia: getChainConfig("sepolia"),
"polygon-mumbai": getChainConfig("polygon-mumbai"),
rootstock: getChainConfig("rootstock"),
rsktestnet: getChainConfig("rsktestnet"),
},
paths: {
artifacts: "./artifacts",