"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNodeUrl = getNodeUrl;
const constants_1 = require("./constants");
function getNodeUrl(chainId) {
    let url = process.env[`NODE_URL_${chainId}`] ?? process.env.CUSTOM_NODE_URL;
    if (url === undefined) {
        // eslint-disable-next-line no-console
        console.log(`No configured RPC provider for chain ${chainId}, reverting to public RPC.`);
        url = constants_1.PUBLIC_NETWORKS[chainId].publicRPC;
    }
    return url;
}
