You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error at the end of lesson 5:Error: could not decode result data (value="0x", info={ "method": "retrive", "signature": "retrive()" }, code=BAD_DATA, version=6.11.1)
#6513
Originally posted by MohammadArif13 March 21, 2024
constfs=require("fs-extra")constethers=require("ethers")const{ JsonRpcProvider }=require("ethers")require("dotenv").config()asyncfunctionmain(){letprovider=newJsonRpcProvider(process.env.RPC_URL)letwallet=newethers.Wallet(process.env.PRIVATE_KEY,provider)constabi=fs.readFileSync("./SimpleStorage_sol_SimpleStorage.abi","utf-8")constbinary=fs.readFileSync("./SimpleStorage_sol_SimpleStorage.bin","utf-8")contractFactory=newethers.ContractFactory(abi,binary,wallet)console.log(process.env.RPC_URL)console.log(process.env.PRIVATE_KEY,provider)console.log("Deploying please wait...")constcontract=awaitcontractFactory.deploy()console.log(contract)constsigner=wallet.connect(provider)constnonce=awaitsigner.getNonce()console.log(sentTxResponse)constcurrentFavoriteNumber=awaitcontract.retrive()console.log(awaitcontract.retrive())console.log(`Current Favorite Number: ${currentFavoriteNumber.toString()}`)consttransactionResponse=awaitcontract.store("12",{nonce: nonce})consttransactionReceipt=awaittransactionResponse.wait(1)constupdatedFavoriteNumber=awaitcontract.retrive()console.log(`Updated Favorite Number ${updatedFavoriteNumber}`)}main().then(()=>process.exit(0)).catch((error)=>{console.error(error)process.exit(1)})// const deploymentReceipt= await contract.waitForDeployment("1") // it imortant line
Hi, on this code i am running into an error: when I am using Alchemy RPC_URL then it gives this error otherwise when I am using ganache there is nothing; Every thing is correct then
Error: could not decode result data (value="0x", info={ "method": "retrive", "signature": "retrive()" }, code=BAD_DATA, version=6.11.1)
below is my RPC_URL but if I am using ganache then there is not any error; all the things are correct then
i have got similar problem.. after trying all solutions i have realized that i didnt install the same versions as patrick installed... once check your solc install for 0.8.7-fixed
Discussed in #6512
Originally posted by MohammadArif13 March 21, 2024
Hi, on this code i am running into an error: when I am using Alchemy RPC_URL then it gives this error otherwise when I am using ganache there is nothing; Every thing is correct then
below is my RPC_URL but if I am using ganache then there is not any error; all the things are correct then
can someone help me?
The text was updated successfully, but these errors were encountered: