Closed
Description
Hi! I run this code in browser, and can't catch promise rejection.
Important: I added await before getContract,however in typings you return Contract, not Promise but the code throw promise rejection!
Code:
let vault;
try {
vault = (await ethers.ContractFactory.getContract(
CONTRACT_ADDRESS,
vaultJson.abi,
signer
) as unknown) as Vault;
} catch (e) {
console.log("Error getting contract");
return;
}
Expected behavior:
Rejection in getContract would be caught in try-catch block
Real outcome:
Unhandled Rejection (Error): resolver or addr is not configured for ENS name (argument="name", value="", code=INVALID_ARGUMENT, version=contracts/5.0.8)
Activity