ethereum - 为什么无法从任何来源找到契约(Contract)的工件

标签 ethereum truffle ganache

我正在使用带有 truffle 和 ganache-cli 的 Windows 10。我有 2 个要部署的契约(Contract)文件包含契约(Contract)中定义的其他契约(Contract)的接口(interface):

契约(Contract):

ERC721Mintable.sol

  • 拥有
  • 可拥有的就是可拥有的
  • ERC165
  • ERC721 可暂停,ERC165
  • ERC721Enumerable是ERC165、ERC721
  • ERC721MetaData 是 ERC721Enumerable,使用 Oraclize
  • CraveuERC721Token 是 ERC721MetaData

Verifier.sol

SolnSquareVerifier.sol

pragma solidity >=0.4.21 <0.6.0;

import "./ERC721Mintable.sol";
import "./Verifier.sol";

contract SolnSqaureVerifier is CraveuERC721Token {

    SquareVerifier squareVerifier;

    constructor(address verifierAddress) public {
        squareVerifier = SquareVerifier(verifierAddress);
    }

这是我的 deploy_contracts.js:

const SquareVerifier = artifacts.require("Verifier");
const SolnSquareVerifier = artifacts.require("SolnSquareVerifier");

module.exports = function(deployer) {
  deployer.deploy(SquareVerifier).then( () => {
    return deployer.deploy(SolnSquareVerifier, SquareVerifier.address);
  });
};

我使用的是 truffle 5.0.18 版本

Error Produced: Error: Error: Could not find artifacts for SolnSquareVerifier from any sources

最佳答案

你的合约名称SolnSqaureVerifier有错,应该是SolnSquareVerifier

关于ethereum - 为什么无法从任何来源找到契约(Contract)的工件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56241008/

相关文章:

ethereum - Solidity 中的断言与要求?

command - Truffle 迁移命令引用错误 : Migrations not defined?

javascript - 契约(Contract)名称抛出未定义的错误?

ethereum - 如何修复 "Unknown network "ganache”。查看可用网络的 Truffle 配置文件。”

blockchain - Rinkeby 认证水龙头已离线

android - 是否可以在 web3j 中对消息(字符串)进行签名/加密,然后使用公钥(地址)解密该消息

ethereum - 尝试使用 brownie 框架将标准 OpenZeppelin ERC777 合约部署到 ganache-cli 时出错

ethereum - Solidity智能合约部署时出错: Uncaught Error: Callback was already called

java - Web3j : Getting last events from a smart contract

ethereum - 如何使用oracle在智能合约中获取不同代币的价格