5 使用hardhat upgrades进行升级时报错Error: The requested contract was not found. Make sure the source code is available for compilation at getContractNameAndRunValidation

问题:使用hardhat upgrades进行升级时报错Error: The requested contract was not found. Make sure the source code is available for compilation at getContractNameAndRunValidation 检查,合约编译文件无问题,可以正常部署合约 追踪代码,定位到@openzeppelin/upgrades-core/src/validate/query.ts:46:11

if (contractName === undefined || runValidation === undefined) {
    throw new Error('The requested contract was not found. Make sure the source code is available for compilation');
  }

应该是验证文件时出了问题,原文件和升级合约只是多了一个设置函数而,没有变动数据结构

请先 登录 后评论

1 个回答

Ethereal - Solidity智能合约开发工程师
请先 登录 后评论
  • 1 关注
  • 0 收藏,2621 浏览
  • Ethereal 提出于 2021-11-06 19:19