@openzeppelin/hardhat-upgrades
Version:
[](https://docs.openzeppelin.com/upgrades-plugins/hardhat-upgrades) [](https://www.npmjs.org/package/@openzeppelin/h
13 lines • 487 B
JavaScript
/**
* Attaches a ContractFactory to an address and returns a Contract instance.
*/
export function attach(contractFactory, address) {
return contractFactory.attach(address); // Needed because ethers attach returns a BaseContract.
}
/**
* Best effort to get a signer from a ContractRunner. Returns undefined if the runner is not a signer.
*/
export function getSigner(runner) {
return runner && 'getAddress' in runner ? runner : undefined;
}
//# sourceMappingURL=ethers.js.map