We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.17.3
When forking the Goerli network in hardhat on block 8660077
there's a contract 0x148f340701D3Ff95c7aA0491f5497709861Ca27D
getting the public bool throws the error..
outside hardhat using ethers everything works fine
const provider = new JsonRpcProvider('https://rpc.goerli.eth.gateway.fm'); const contract = new Contract('0x148f340701D3Ff95c7aA0491f5497709861Ca27D', abi, provider);
console.log(await contract.isLocked()); // true
Fork goerli on block >= 8649158 and run the code
const abi = [ { "inputs": [ { "internalType": "uint8", "name": "_doorNumber", "type": "uint8" }, { "internalType": "bytes32", "name": "_doorOwnerName", "type": "bytes32" }, { "internalType": "bool", "name": "_isLocked", "type": "bool" }, { "internalType": "bytes32", "name": "_secretSpell", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "isLocked", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_secretSpell", "type": "bytes32" } ], "name": "unlockDoor", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" } ] const [user] = await getSigners(); const theContract = new ethers.Contract('0x148f340701D3Ff95c7aA0491f5497709861Ca27D, abi, user); await theContract.isLocked() // throws the error
Error: could not decode result data
The text was updated successfully, but these errors were encountered:
sorry, my bad, I had a wrong rpc in .env
Sorry, something went wrong.
fvictorio
No branches or pull requests
Version of Hardhat
2.17.3
What happened?
When forking the Goerli network in hardhat on block 8660077
there's a contract 0x148f340701D3Ff95c7aA0491f5497709861Ca27D
getting the public bool throws the error..
outside hardhat using ethers everything works fine
const provider = new JsonRpcProvider('https://rpc.goerli.eth.gateway.fm');
const contract = new Contract('0x148f340701D3Ff95c7aA0491f5497709861Ca27D', abi, provider);
console.log(await contract.isLocked()); // true
Minimal reproduction steps
Fork goerli on block >= 8649158 and run the code
Search terms
Error: could not decode result data
The text was updated successfully, but these errors were encountered: