ethers.js/packages/experimental/lib.esm/eip-provider.js

15 lines
499 B
JavaScript
Raw Permalink Normal View History

2020-02-10 15:51:58 -05:00
"use strict";
import { ethers } from "ethers";
import { version } from "./_version";
const logger = new ethers.utils.Logger(version);
export class EipWrappedProvider extends ethers.providers.JsonRpcProvider {
constructor(provider, network) {
logger.checkNew(new.target, EipWrappedProvider);
super("eip1193:/\/", network);
ethers.utils.defineReadOnly(this, "provider", provider);
}
send(method, params) {
return this.provider.send(method, params);
}
}