2022-09-05 23:57:11 +03:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
exports.CloudflareProvider = void 0;
|
2022-09-16 05:58:45 +03:00
|
|
|
const index_js_1 = require("../utils/index.js");
|
2022-09-05 23:57:11 +03:00
|
|
|
const network_js_1 = require("./network.js");
|
|
|
|
const provider_jsonrpc_js_1 = require("./provider-jsonrpc.js");
|
2022-11-30 23:44:23 +03:00
|
|
|
/**
|
|
|
|
* Aboud Cloudflare...
|
|
|
|
*
|
|
|
|
* @_docloc: api/providers/thirdparty
|
|
|
|
*/
|
2022-09-05 23:57:11 +03:00
|
|
|
class CloudflareProvider extends provider_jsonrpc_js_1.JsonRpcProvider {
|
2022-11-30 23:44:23 +03:00
|
|
|
constructor(_network) {
|
|
|
|
if (_network == null) {
|
|
|
|
_network = "mainnet";
|
|
|
|
}
|
2022-09-05 23:57:11 +03:00
|
|
|
const network = network_js_1.Network.from(_network);
|
2022-11-09 10:57:02 +03:00
|
|
|
(0, index_js_1.assertArgument)(network.name === "mainnet", "unsupported network", "network", _network);
|
2022-09-05 23:57:11 +03:00
|
|
|
super("https:/\/cloudflare-eth.com/", network, { staticNetwork: network });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
exports.CloudflareProvider = CloudflareProvider;
|
|
|
|
//# sourceMappingURL=provider-cloudflare.js.map
|