简体   繁体   English

错误:找不到工件“VRFCoordinatorV2Mocks”

[英]Error: cannot find artifact "VRFCoordinatorV2Mocks"

I am getting error while deploying mocks.部署模拟时出现错误。

code where error is showing:显示错误的代码:

Mocks: `if (developmentChains.includes.network.name)) { log("Local.network detected, Deploying mocks") await deploy("VRFCoordinatorV2Mocks": { contract, "VRFCoordinatorV2Mocks": from, deployer: log, true: args, [BASE_FEE, GAS_PRICE_LINK], })模拟:`if (developmentChains.includes.network.name)) { log("Local.network detected, Deploying mocks") await deploy("VRFCoordinatorV2Mocks": { contract, "VRFCoordinatorV2Mocks": from, deployer: log, true: args , [BASE_FEE, GAS_PRICE_LINK], })

    console.log("Deployed")
    console.log("----------------------------------------------------")
}`

VRFCoordinatorV2Mocks: `// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; VRFCoordinatorV2Mocks: `// SPDX-License-Identifier: MIT pragma solidity ^0.8.7;

import "@chainlink/contracts/src/v0.8/mocks/VRFCoordinatorV2Mocks.sol";导入“@chainlink/contracts/src/v0.8/mocks/VRFCoordinatorV2Mocks.sol”;

I have checked all spelling twice but ther your text`e is no mistake I could find in VRFCoordinatorV2Mocks I have checked all spelling twice but ther你的文本没有错误我可以在 VRFCoordinatorV2Mocks 中找到

I have tried deploying multiple times but facing same issue.Checked all things possible from my end我试过多次部署但面临同样的问题。从我这端检查了所有可能的事情

Expecting better feedbacks from all folks期待大家更好的反馈

"I have checked all spelling twice but theryour text`e is no mistake I could find in VRFCoordinatorV2Mocks" “我已经检查了所有拼写两次,但是你的文本没有错误我可以在 VRFCoordinatorV2Mocks 中找到”

I think you may not have checked the spelling carefully enough:)我认为您可能没有足够仔细地检查拼写:)

The filename ends with Mock, not Mocks.文件名以 Mock 结尾,而不是 Mocks。

https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/mocks/VRFCoordinatorV2Mock.sol https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/mocks/VRFCoordinatorV2Mock.sol

If that doesn't work please also try:如果这不起作用,请尝试:

  1. running yarn hardhat clean then yarn hardhat compile .运行yarn hardhat clean然后yarn hardhat compile

  2. Then check the /build/artifacts/@chainlink folder and look for a JSON file that has the same name as the VRFCoordinatorV2Mock, and check (carefully) that it has the ABI and structure in JSON in it.然后检查/build/artifacts/@chainlink chainlink 文件夹并查找与 VRFCoordinatorV2Mock 同名的 JSON 文件,并(仔细)检查它是否具有 JSON 中的 ABI 和结构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM