Closed agrawalravi95 closed 2 years ago
You're calling finishMint
, but you need to mint the token first... You might need to wait longer for the original transaction to go through. Could add a simple tx.wait()
between transactions.
same issue `let { networkConfig, getNetworkIdFromName } = require('../helper-hardhat-config') const fs = require('fs')
module.exports = async ({ getNamedAccounts, deployments, getChainId }) => {
const { deploy, get, log } = deployments
const { deployer } = await getNamedAccounts()
const chainId = await getChainId()
let linkTokenAddress
let vrfCoordinatorAddress
if (chainId == 31337) {
let linkToken = await get('LinkToken')
let VRFCoordinatorMock = await get('VRFCoordinatorMock')
linkTokenAddress = linkToken.address
vrfCoordinatorAddress = VRFCoordinatorMock.address
additionalMessage = " --linkaddress " + linkTokenAddress
} else {
linkTokenAddress = networkConfig[chainId]['linkToken']
vrfCoordinatorAddress = networkConfig[chainId]['vrfCoordinator']
}
const keyHash = networkConfig[chainId]['keyHash']
const fee = networkConfig[chainId]['fee']
args = [vrfCoordinatorAddress, linkTokenAddress, keyHash, fee]
console.log("----------------------------------------------------")
const RandomSVG = await deploy('Duel_NFTs', {
from: deployer,
args: args,
log: true
})
console.log(`You have deployed an NFT contract to ${RandomSVG.address}`)
const networkName = networkConfig[chainId]['name']
console.log(`Verify with:\n npx hardhat verify --network ${networkName} ${RandomSVG.address} ${args.toString().replace(/,/g, " ")}`)
const RandomSVGContract = await ethers.getContractFactory("Duel_NFTs")
const accounts = await hre.ethers.getSigners()
const signer = accounts[0]
const randomSVG = new ethers.Contract(RandomSVG.address, RandomSVGContract.interface, signer)
// fund with LINK
let networkId = await getNetworkIdFromName(network.name)
const fundAmount = networkConfig[networkId]['fundAmount']
const linkTokenContract = await ethers.getContractFactory("LinkToken")
const linkToken = new ethers.Contract(linkTokenAddress, linkTokenContract.interface, signer)
let fund_tx = await linkToken.transfer(RandomSVG.address, fundAmount)
await fund_tx.wait(1)
// await new Promise(r => setTimeout(r, 5000))
console.log("Let's create an NFT now!")
tx = await randomSVG.openBooster_Yugi({ gasLimit: 300000 })
let receipt = await tx.wait(1)
let tokenId = receipt.events[3].topics[2]
console.log(`You've made your NFT! This is number ${tokenId}`)
console.log("Let's wait for the Chainlink VRF node to respond...")
await new Promise(r => setTimeout(r, 180000))
console.log(`Now let's finish the mint... (on chain)`)
tx = await randomSVG.finishMint(tokenId, { gasLimit: 2000000 })
await tx.wait(1)
console.log(`You can view the tokenURI here ${await randomSVG.tokenURI(0)}`)
}
module.exports.tags = ['all', 'rsvg'] ` here is my deploy.js
Error: ERROR processing D:\Projects\Dapps\nft_duel\deploy\deploy.js: Error: transaction failed (transactionHash="0x6095953a2ef18f0e4b508f1ec4d268453e5bcd87128951b8c965d1789c18270d", transaction={"hash":"0x6095953a2ef18f0e4b508f1ec4d268453e5bcd87128951b8c965d1789c18270d","type":2,"accessList":[],"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0xa49d133457064fd5d1510700fcE56d24F3f0EeED","gasPrice":{"type":"BigNumber","hex":"0x77359414"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x77359400"},"maxFeePerGas":{"type":"BigNumber","hex":"0x77359414"},"gasLimit":{"type":"BigNumber","hex":"0x1e8480"},"to":"0x11fd6f29dB00f13dF945d4565a8e3Ca8F06beCAd","value":{"type":"BigNumber","hex":"0x00"},"nonce":59,"data":"0x624194c70000000000000000000000000000000000000000000000000000000000000001","r":"0x26f9a28e2eb504666c91020569c3be749cfaa0f3133d1c7c917b774bb44ca656","s":"0x7daf9e0273d4f8a79350a52f68324df70b5a3870fe50c0af26da3ceb51298926","v":0,"creates":null,"chainId":4}, receipt={"to":"0x11fd6f29dB00f13dF945d4565a8e3Ca8F06beCAd","from":"0xa49d133457064fd5d1510700fcE56d24F3f0EeED","contractAddress":null,"transactionIndex":18,"gasUsed":{"type":"BigNumber","hex":"0x5e70"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x56621732cb981e54fafba8887af63b42e7ab38e1747e4cd6e9dbc4d6bc8213a2","transactionHash":"0x6095953a2ef18f0e4b508f1ec4d268453e5bcd87128951b8c965d1789c18270d","logs":[],"blockNumber":10012550,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0xa4fd2d"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x77359410"},"status":0,"type":2,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.5.2) at Logger.makeError (D:\Projects\Dapps\nft_duel\node_modules\@ethersproject\logger\src.ts\index.ts:225:28) at Logger.throwError (D:\Projects\Dapps\nft_duel\node_modules\@ethersproject\logger\src.ts\index.ts:237:20) at EthersProviderWrapper.<anonymous> (D:\Projects\Dapps\nft_duel\node_modules\@ethersproject\providers\src.ts\base-provider.ts:1336:24) at step (D:\Projects\Dapps\nft_duel\node_modules\@ethersproject\providers\lib\base-provider.js:48:23) at Object.next (D:\Projects\Dapps\nft_duel\node_modules\@ethersproject\providers\lib\base-provider.js:29:53) at fulfilled (D:\Projects\Dapps\nft_duel\node_modules\@ethersproject\providers\lib\base-provider.js:20:58) at DeploymentsManager.executeDeployScripts (D:\Projects\Dapps\nft_duel\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1232:19) at DeploymentsManager.runDeploy (D:\Projects\Dapps\nft_duel\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1062:5) at SimpleTaskDefinition.action (D:\Projects\Dapps\nft_duel\node_modules\hardhat-deploy\src\index.ts:409:5) at Environment._runTaskDefinition (D:\Projects\Dapps\nft_duel\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14) at Environment.run (D:\Projects\Dapps\nft_duel\node_modules\hardhat\src\internal\core\runtime-environment.ts:129:14) at SimpleTaskDefinition.action (D:\Projects\Dapps\nft_duel\node_modules\hardhat-deploy\src\index.ts:555:32) at Environment._runTaskDefinition (D:\Projects\Dapps\nft_duel\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14) at Environment.run (D:\Projects\Dapps\nft_duel\node_modules\hardhat\src\internal\core\runtime-environment.ts:129:14) at SimpleTaskDefinition.action (D:\Projects\Dapps\nft_duel\node_modules\hardhat-deploy\src\index.ts:640:5) at Environment._runTaskDefinition (D:\Projects\Dapps\nft_duel\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14)
Error is likely the same
Error is the same. I am trying by increasing the timeout limit to 360000 instead of 180000. However, as per @PatrickAlphaC's suggestion, we need to add a tx.wait() somewhere.
However, I have a query. The finish_tx is being initialized after the timeout. So while processing, the time will run out, then the finish_tx would be initialized and a transaction would be created. Post which there is anyway a finish_tx.wait(1)
So, still confused about where to wait. @PatrickAlphaC Would you please be so kind to help us out?
Update: So I put a wait time of 50 mins instead of 3 minutes and the mint was successful. While working on the ehtereum mainnet, how would we know what time frame is right?
Yikes... Thats a long time.
Ideally we just listen for the event instead of the "dumb" wait. That would be the next improvement to this repo. That way you never have to guess. Will close this for now, but would love to see someone add that...
Hey Patrick, I was trying to debug this better and understand if even waiting for the event would solve this. So I did the following things:
Chainlink Loop No: 41
Chainlink Loop No: 42
Chainlink Loop No: 43
Chainlink Loop No: 44
RandomNumber for token ID: 0x0000000000000000000000000000000000000000000000000000000000000001is 0
Chainlink Loop No: 45
RandomNumber for token ID: 0x0000000000000000000000000000000000000000000000000000000000000001is 0
Chainlink Loop No: 46
RandomNumber for token ID: 0x0000000000000000000000000000000000000000000000000000000000000001is 0
Chainlink Loop No: 47
RandomNumber for token ID: 0x0000000000000000000000000000000000000000000000000000000000000001is 20844066088208692960995938654514283952044381582290496409877110548879264498308
=======================================
========Finishing Minting SVG==========
======================================
Each loop number is a 30 second poll. So sometimes, the randomnumber is assigned within 28 loops, sometimes 50. This could be replaced with an event watcher. I will do that. However, the transaction still failed after the randomNumber was available. Here are a few errors I ran into. I shall try to understand each one of them, but the ones that still boggles me is the error output below:
Random Number: 88958181642816311227596533905343866662236909673002470801314673367413233837750
An unexpected error occurred:
Error: ERROR processing /Users/raviagrawal/Work/NFT On Chain/trial-01/deploy/02_deploy_randomSVG.js:
Error: transaction failed (transactionHash="0x5b4247144eb0d595276151d819d0a90339a8defa244dae8835468f4b56614c27", transaction={"hash":"0x5b4247144eb0d595276151d819d0a90339a8defa244dae8835468f4b56614c27","type":2,"accessList":[],"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x9894ED3DD29241DB5229DD9E54FA6C8ABd044EE5","gasPrice":{"type":"BigNumber","hex":"0x9502f912"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x9502f900"},"maxFeePerGas":{"type":"BigNumber","hex":"0x9502f912"},"gasLimit":{"type":"BigNumber","hex":"0x1e8480"},"to":"0xdE587d44ADDf51B6F0661B30a46c7aA4c033641F","value":{"type":"BigNumber","hex":"0x00"},"nonce":177,"data":"0x624194c70000000000000000000000000000000000000000000000000000000000000001","r":"0x24099a1e07947337194241330f16ba9db1fb89792908e09943079a1eebe7b906","s":"0x2c8bb01265794b5ee8c6d8c1f29601e5fcf856e215a6f479d513f4da78b17f45","v":1,"creates":null,"chainId":4}, receipt={"to":"0xdE587d44ADDf51B6F0661B30a46c7aA4c033641F","from":"0x9894ED3DD29241DB5229DD9E54FA6C8ABd044EE5","contractAddress":null,"transactionIndex":11,"gasUsed":{"type":"BigNumber","hex":"0x1e8480"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0xac51f1365ec9acc55f79f8b82704e04ca8be5c2c69df5045aaceeab04be26c49","transactionHash":"0x5b4247144eb0d595276151d819d0a90339a8defa244dae8835468f4b56614c27","logs":[],"blockNumber":10035321,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x2efad6"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x9502f90f"},"status":0,"type":2,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.5.2)
On verifying on Rinkeby etherscan — I can see the same error — Fail with error 'ERC721URIStorage: URI query for nonexistent token
.
Weird thing is — the success rate of the application after implementing the while loop for checking validity of randomNumber has increased. But it is still very hideous as to why is the transaction failing now. It breaks while calling the finish_tx.wait(1)
function.
Should we wait for the event here as well and then do a "finish_tx.wait(1)"? My question is — implementing these while loops — will it increase the gas price when the contract runs on the mainnet?
Apologies for so many questions — but I shall be really grateful if you could take sometime to go through my query.
Should we wait for the event here as well and then do a "finish_tx.wait(1)"? Yes
My question is — implementing these while loops — will it increase the gas price when the contract runs on the mainnet? Yes. Adding any data (even a boolean flag) and doing any computation (changing the boolean flag) on-chain will increase gas price.
Hopefully that helps.
I am also getting the same error however it happens when waiting for the randomSVG.create() function to complete. I have a tx.wait(1) as suggested yet still receiving the same error. Deploying SVG works successfully on rinkeby. The rinkeby etherscan does not reveal much either. I am able to deploy the contract locally
Error: ERROR processing C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\deploy\02_deploy_randomSVG.js:
Error: transaction failed (transactionHash="0xe40a797055ade03893ed76fcbd1f51e7cbff44b457be2c442014af0d5eda6cac", transaction={"hash":"0xe40a797055ade03893ed76fcbd1f51e7cbff44b457be2c442014af0d5eda6cac","type":2,"accessList":[],"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x67cF969cD864E915E45d84eD416053148B61C6AE","gasPrice":{"type":"BigNumber","hex":"0x3b9aca1d"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x3b9aca11"},"maxFeePerGas":{"type":"BigNumber","hex":"0x3b9aca1d"},"gasLimit":{"type":"BigNumber","hex":"0x98967f"},"to":"0xb7402F1527bBF603018A21ee46194D3Ebc940890","value":{"type":"BigNumber","hex":"0x00"},"nonce":47,"data":"0xefc81a8c","r":"0x7e02bdbe9ec497f542c096752b123460288ab2bc6fece599d470f77e7809b2dd","s":"0x676a56f0d924fa15e5bed21b3c8df262faac36224643e3b3af2e4d9e64f3300f","v":1,"creates":null,"chainId":4}, receipt={"to":"0xb7402F1527bBF603018A21ee46194D3Ebc940890","from":"0x67cF969cD864E915E45d84eD416053148B61C6AE","contractAddress":null,"transactionIndex":23,"gasUsed":{"type":"BigNumber","hex":"0xcb9c"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x71e2fa49c8281e0bf27c4d47f525718dfc0f72356cbd94a2e16436d28e88e7e2","transactionHash":"0xe40a797055ade03893ed76fcbd1f51e7cbff44b457be2c442014af0d5eda6cac","logs":[],"blockNumber":10302431,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x3fe15d"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x3b9aca1b"},"status":0,"type":2,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.5.3)
at Logger.makeError (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\logger\src.ts\index.ts:225:28)
at Logger.throwError (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\logger\src.ts\index.ts:237:20)
at EthersProviderWrapper.<anonymous> (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\src.ts\base-provider.ts:1352:24)
at step (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\lib\base-provider.js:48:23)
at Object.next (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\lib\base-provider.js:29:53)
at fulfilled (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\lib\base-provider.js:20:58)
at DeploymentsManager.executeDeployScripts (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1223:19)
at DeploymentsManager.runDeploy (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1053:5)
at SimpleTaskDefinition.action (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\index.ts:422:5)
at Environment._runTaskDefinition (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14)
at Environment.run (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:129:14)
at SimpleTaskDefinition.action (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\index.ts:568:32)
at Environment._runTaskDefinition (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14)
at Environment.run (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:129:14)
at SimpleTaskDefinition.action (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\index.ts:653:5)
at Environment._runTaskDefinition (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14)
harri@DESKTOP-01G6233 MINGW64 ~/Desktop/SideProj/Prophecy/Prophecy-Smart-Contract
$ npx hardhat deploy --network rinkeby --tags rsvg
Compiled 1 Solidity file successfully
---------------------------------
deploying "RandomSVG" (tx: 0x0513be012626dc4f663e76dbce4e054b5e9e611c2ddbcc77ab6ef7478c8734a5)...: deployed at 0xaC130C6ECa213451b0eeEbAe74Dfc6BbAC840382 with 4547588 gas
You have deployed your NFT contract!
Verify with:
npx hardhat verify --network rinkeby 0xaC130C6ECa213451b0eeEbAe74Dfc6BbAC840382 0x6168499c0cFfCaCD319c818142124B7A15E857ab 0x01BE23585060835E02B77ef475b0Cc51aA1e0709 0xd89b2bf150e3b9e13446986e571fb9cab24b13cea0a43ea20a6049a85cc807cc 250000000000000000
linkTokenContract
accounts
Duplicate definition of Transfer (Transfer(address,address,uint256,bytes), Transfer(address,address,uint256))
fund_tx
creation_tx
An unexpected error occurred:
Error: ERROR processing C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\deploy\02_deploy_randomSVG.js:
Error: transaction failed (transactionHash="0x020c88c9742991bb8c93d018daa153ce6916916d8fd726c9adce30240da0f2e2", transaction={"hash":"0x020c88c9742991bb8c93d018daa153ce6916916d8fd726c9adce30240da0f2e2","type":2,"accessList":[],"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x67cF969cD864E915E45d84eD416053148B61C6AE","gasPrice":{"type":"BigNumber","hex":"0x59682f0b"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x59682f0b"},"gasLimit":{"type":"BigNumber","hex":"0x98967f"},"to":"0xaC130C6ECa213451b0eeEbAe74Dfc6BbAC840382","value":{"type":"BigNumber","hex":"0x00"},"nonce":50,"data":"0xefc81a8c","r":"0x02bad9fdecc258b0d4435792528e50eff08489ae6171a989f71b6bab4c613923","s":"0x6ed9b5942dff55b78b7fcb0c0fae10d475518b9b839af858fa9fcd9badef298b","v":1,"creates":null,"chainId":4}, receipt={"to":"0xaC130C6ECa213451b0eeEbAe74Dfc6BbAC840382","from":"0x67cF969cD864E915E45d84eD416053148B61C6AE","contractAddress":null,"transactionIndex":40,"gasUsed":{"type":"BigNumber","hex":"0xd8e6"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x5ea44c88f90f0bf79f91570c57648b694ec9af1f0183055b4dc5c7bc6a277cb7","transactionHash":"0x020c88c9742991bb8c93d018daa153ce6916916d8fd726c9adce30240da0f2e2","logs":[],"blockNumber":10302445,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x218ee3"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x59682f09"},"status":0,"type":2,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.5.3)
at Logger.makeError (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\logger\src.ts\index.ts:225:28)
at Logger.throwError (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\logger\src.ts\index.ts:237:20)
at EthersProviderWrapper.<anonymous> (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\src.ts\base-provider.ts:1352:24)
at step (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\lib\base-provider.js:48:23)
at Object.next (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\lib\base-provider.js:29:53)
at fulfilled (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\@ethersproject\providers\lib\base-provider.js:20:58)
at runNextTicks (node:internal/process/task_queues:61:5)
at processTimers (node:internal/timers:497:9)
at DeploymentsManager.executeDeployScripts (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1223:19)
at runNextTicks (node:internal/process/task_queues:61:5)
at processTimers (node:internal/timers:497:9)
at DeploymentsManager.runDeploy (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\DeploymentsManager.ts:1053:5)
at SimpleTaskDefinition.action (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\index.ts:422:5)
at Environment._runTaskDefinition (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14)
at Environment.run (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:129:14)
at SimpleTaskDefinition.action (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat-deploy\src\index.ts:568:32)
at Environment._runTaskDefinition (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:217:14)
at Environment.run (C:\Users\harri\Desktop\SideProj\Prophecy\Prophecy-Smart-Contract\node_modules\hardhat\src\internal\core\runtime-environment.ts:129:14)
I just pushed a new commit. Could you git pull and try again?
Hey, I have been trying to follow the instruction mentioned in one of your tutorials and I am unable to mint the random SVG.
I have set up the correct URLs and private key environment variables.
I am getting the following error:
`Let's wait for the Chainlink VRF node to respond... Now let's finsih the mint... An unexpected error occurred:
Error: ERROR processing /Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/deploy/02_Deploy_RandomSVG.js: Error: transaction failed (transactionHash="0xd7930b5bba305cdda3bfd8b998824caf54aad80414c2997880e95efabe42a833", transaction={"hash":"0xd7930b5bba305cdda3bfd8b998824caf54aad80414c2997880e95efabe42a833","type":2,"accessList":[],"blockHash":null,"blockNumber":null,"transactionIndex":null,"confirmations":0,"from":"0x9894ED3DD29241DB5229DD9E54FA6C8ABd044EE5","gasPrice":{"type":"BigNumber","hex":"0x69fc890b"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59600ed7"},"maxFeePerGas":{"type":"BigNumber","hex":"0x69fc890b"},"gasLimit":{"type":"BigNumber","hex":"0x1e8480"},"to":"0xdCF351e91BBA51125FA871A93FAC873022D9E24e","value":{"type":"BigNumber","hex":"0x00"},"nonce":15,"data":"0x624194c70000000000000000000000000000000000000000000000000000000000000003","r":"0xa8a37caf2a32071c9824fae1bf5cee88b84896a8102944dff67cb9c21b64fe56","s":"0x349d07927fcf29df6c9a65684ed2a6ecc2d07ff50560b3a0f56aeaa588373edb","v":1,"creates":null,"chainId":4}, receipt={"to":"0xdCF351e91BBA51125FA871A93FAC873022D9E24e","from":"0x9894ED3DD29241DB5229DD9E54FA6C8ABd044EE5","contractAddress":null,"transactionIndex":36,"gasUsed":{"type":"BigNumber","hex":"0x5eba"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x47c5a77fc2b388222e59bb67b1714a807eb3ae88db544ad0652e26a301d479a7","transactionHash":"0xd7930b5bba305cdda3bfd8b998824caf54aad80414c2997880e95efabe42a833","logs":[],"blockNumber":10006270,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0x0122e634"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x66800a43"},"status":0,"type":2,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.5.2) at Logger.makeError (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/@ethersproject/logger/src.ts/index.ts:225:28) at Logger.throwError (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/@ethersproject/logger/src.ts/index.ts:237:20) at EthersProviderWrapper. (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/@ethersproject/providers/src.ts/base-provider.ts:1336:24)
at step (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/@ethersproject/providers/lib/base-provider.js:48:23)
at Object.next (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/@ethersproject/providers/lib/base-provider.js:29:53)
at fulfilled (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/@ethersproject/providers/lib/base-provider.js:20:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at DeploymentsManager.executeDeployScripts (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1014:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at DeploymentsManager.runDeploy (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat-deploy/src/DeploymentsManager.ts:849:5)
at Environment._runTaskDefinition (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
at SimpleTaskDefinition.action (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat-deploy/src/index.ts:446:32)
at Environment._runTaskDefinition (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
at SimpleTaskDefinition.action (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat-deploy/src/index.ts:521:5)
at Environment._runTaskDefinition (/Users/raviagrawal/Work/NFT On Chain/all-on-chain-generated-nft/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
`
On checking the transaction details on Etherscan
The error I see is:
Fail with error 'ERC721URIStorage: URI query for nonexistent token'
I havent made any changes to the JS or the SOL files, so I assume, it must be passing the generated tokenID.I am unable to understand what might be wrong here. Can someone please help?