text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  const config_1 = require("@nomiclabs/buidler/config");
  const plugins_1 = require("@nomiclabs/buidler/plugins");
  const deploy_1 = require("./deploy");
  const link_1 = require("./link");
  const matchers_1 = require("./matchers");
  function default_1() {
      config_1.extendEnvironment((bre) => {
          // We can't actually implement a MockProvider because of its private
          // properties, so we cast it here 😢
          bre.waffle = plugins_1.lazyObject(() => {
              const { WaffleMockProviderAdapter, } = require("./waffle-provider-adapter");
              const { buidlerCreateFixtureLoader } = require("./fixtures");
              const buidlerWaffleProvider = new WaffleMockProviderAdapter(bre.network);
              return {
                  provider: buidlerWaffleProvider,
                  deployContract: deploy_1.buidlerDeployContract.bind(undefined, bre),
                  deployMockContract: deploy_1.getDeployMockContract(),
                  solidity: require("./waffle-chai"),
                  createFixtureLoader: buidlerCreateFixtureLoader.bind(undefined, buidlerWaffleProvider),
                  loadFixture: buidlerCreateFixtureLoader(buidlerWaffleProvider),
                  link: link_1.getLinkFunction(),
              };
          });
          matchers_1.initializeWaffleMatchers(bre.config.paths.root);
      });
      config_1.usePlugin("@nomiclabs/buidler-ethers");
  }
  exports.default = default_1;
  //# sourceMappingURL=index.js.map