{"reason":"cannot estimate gas; transaction may fail or may require manual gas limit","code":"UNPREDICTABLE_GAS_LIMIT","error":{"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":56,\"error\":{\"code\":-32000,\"message\":\"execution reverted\"}}\n","error":{"code":-32000},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"gasPrice\":\"0x28fa6ae00\",\"from\":.....

Aug 13, 2021, 12:36 PM
well it seems like an specific issue with that contract. can deploy other contracts.
how do I set gas limit on ethersjs deploy?
ts
const {abi, bytecode} = JSON.parse(readFileSync(join('build', contract_file), 'utf-8'));
const factory = new ethers.ContractFactory(abi, bytecode, wallet);
const contract = await factory.deploy();
deploy only takes constructor args
Aug 13, 2021, 12:38 PM

© 2024 Draquery.com All rights reserved.