UNPKG

@nomiclabs/buidler-ethers

Version:
22 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const config_1 = require("@nomiclabs/buidler/config"); const plugins_1 = require("@nomiclabs/buidler/plugins"); const helpers_1 = require("./helpers"); function default_1() { config_1.extendEnvironment((env) => { env.ethers = plugins_1.lazyObject(() => { const { EthersProviderWrapper } = require("./ethers-provider-wrapper"); const { ethers } = require("ethers"); return Object.assign(Object.assign({}, ethers), { // The provider wrapper should be removed once this is released // https://github.com/nomiclabs/buidler/pull/608 provider: new EthersProviderWrapper(env.network.provider), getSigners: async () => helpers_1.getSigners(env), // We cast to any here as we hit a limitation of Function#bind and // overloads. See: https://github.com/microsoft/TypeScript/issues/28582 getContractFactory: helpers_1.getContractFactory.bind(null, env), getContractAt: helpers_1.getContractAt.bind(null, env) }); }); }); } exports.default = default_1; //# sourceMappingURL=index.js.map