UNPKG

@tenderly/actions-test

Version:
25 lines 862 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TestGateways = void 0; const metadata_1 = require("./metadata"); class TestGateways { constructor() { this.gatewayConfig = new Map(); this.metadata = new metadata_1.TestMetadata(); } getGateway(network, name) { if (!network) { const metadataNetwork = this.metadata.getNetwork(); if (!metadataNetwork) { throw new Error("No network found for current execution!"); } } const gatewayConfig = this.gatewayConfig.get(name ?? ""); return `https://${network}.gateway.tenderly.co/${gatewayConfig?.accessKey}`; } setConfig(name, config) { this.gatewayConfig.set(name, config); } } exports.TestGateways = TestGateways; //# sourceMappingURL=gateways.js.map