@solarity/hardhat-migrate
Version:
The simplest way to deploy smart contracts
19 lines • 526 B
JavaScript
export let ethersProvider = null;
export let connection = null;
export let migratorConfig = null;
export async function createEthersProvider(hre) {
migratorConfig = hre.config.migrate;
if (ethersProvider) {
return;
}
connection = await hre.network.connect();
ethersProvider = connection.ethers;
}
/**
* Used only in test environments to ensure test atomicity
*/
export function resetEthersProvider() {
connection = null;
ethersProvider = null;
}
//# sourceMappingURL=EthersProvider.js.map