Following workshop of https://www.twitch.tv/videos/1218449997
GitHub repo: https://github.com/PatrickAlphaC/battle-game
On the command npx hardhat deploy
getting an error:
An unexpected error occurred:
Error: ERROR processing /home/zage/code/HackChainLink/ChampionQuest/deploy/01_deploy_champion_quest_token.js:
Error: cannot find artifact "ChampionQuestToken"
at getArtifact (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/DeploymentsManager.ts:213:17)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at runNextTicks (internal/process/task_queues.js:64:3)
at listOnTimeout (internal/timers.js:526:9)
at processTimers (internal/timers.js:500:7)
at getArtifactFromOptions (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/helpers.ts:486:18)
at getLinkedArtifact (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/helpers.ts:496:38)
at _deploy (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/helpers.ts:517:54)
at _deployOne (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/helpers.ts:910:16)
at Object.deployMocks [as func] (/home/zage/code/HackChainLink/ChampionQuest/deploy/01_deploy_champion_quest_token.js:12:30)
at DeploymentsManager.executeDeployScripts (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1220:19)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at runNextTicks (internal/process/task_queues.js:64:3)
at listOnTimeout (internal/timers.js:526:9)
at processTimers (internal/timers.js:500:7)
at DeploymentsManager.runDeploy (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1050:5)
at SimpleTaskDefinition.action (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/index.ts:405:5)
at Environment._runTaskDefinition (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
at Environment.run (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
at SimpleTaskDefinition.action (/home/zage/code/HackChainLink/ChampionQuest/node_modules/hardhat-deploy/src/index.ts:551:32)
01_deploy_champion_quest_token.js
code is here:
/* eslint-disable node/no-unpublished-import */
// eslint-disable-next-line node/no-missing-import
const hre = require("hardhat")
const deployMocks = async function (hre) {
const { deployments, getNamedAccounts, getChainId } = hre
const { deploy, log, get } = deployments
const { deployer } = await getNamedAccounts()
const chainId = await getChainId()
const ufoToken = await get("MockUFO")
const championQuestToken = await deploy("ChampionQuestToken", {
from: deployer,
log: true,
args: [ufoToken.address],
})
}
module.exports = deployMocks
deployMocks.tags = ["all", "token"]
Code cloned from github repo.
Tried to delete cache
and artifacts
folders - did't help.