我正在尝试安装和使用由ConsenSys编写的python解析器
我继续得到以下错误
File "<stdin>", line 1, in <module> File "/home/seed/.local/lib/python3.5/site-packages/python-solidity-parser/solidity_parser/__init__.py", line 1, in <module> from .parser import parse_file, parse, objectify, visit
我试图编译这段代码:
contract C {
struct s {
string chan;
string content;
}
s[] x = new s[](0);
}
它给我带来了一个令人困惑的编译器错误:
Unimplemented feature:
/solidity/libsolidity/codegen/ArrayUtils.cpp(237): Throw in function solidity::frontend::ArrayUtils::copyArrayToStorage(const solidity::front
我试图在VScode中运行一个简单的代码。
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract WavePortal {
constructor() {
console.log("Yo yo, I am a contract and I am smart");
}
}
当我试图编译代码时,它显示了以下错误
这是我的launch.json
{
// Use Intel
编译失败了。
vi contracts/MyCoin.sol:
pragma solidity ^0.4.18;
import 'zeppelin-solidity/contracts/token/ERC20/StandardToken.sol';
contract MyCoin is StandardToken {
string public name = "MyCoin";
string public symbol = "MC";
uint public decimals = 2;
uint public INITIAL_
我正在尝试安装和使用,pip3安装没有给出错误,但当我尝试导入模块时,它显示
File "<stdin>", line 1, in <module>
File "/home/seed/.local/lib/python3.5/site-packages/python-solidity-parser/solidity_parser/__init__.py", line 1, in <module>
from .parser import parse_file, parse, objectify, visit
Fi
我试图从源代码构建solidity编译器(solc),源代码是从实心储存库克隆的。我遵循了坚实性文件中的指令,但在执行时遇到了一个错误:cmake .. && make。cmake错误如下:
[ 42%] Building CXX object libsolidity/CMakeFiles/solidity.dir/formal/Z3Interface.cpp.o
/my/path/to/solidity/libsolidity/formal/Z3Interface.cpp: In member function ‘z3::expr dev::solidity::smt::Z3
我有一个可靠的项目,文件如下
pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
当我试图编译时,在未安装的库上会出现错误。
npx hardhat compile
Error HH411: The library openzeppelin-solidity,
imported from contracts/....sol, is not installed.
Try installing it using npm.
我试图通过硬帽子编译两个不同的契约,使用两个不同的编译器版本。我不断地发现错误:
Error HH606: The project cannot be compiled, see reasons below.
The Solidity version pragma statement in these files doesn't match any of the configured compilers in your config. Change the pragma or configure additional compiler versions in your hardhat
我安装了Openzeppelin框架并创建了一个简单的令牌simple。
pragma solidity ^0.4.24;
import "node_modules/openzeppelin-solidity/contracts/token/ERC20/MintableToken.sol";
contract SToken is MintableToken {
string public constant name = "SS Token";
string public constant symbol = "SKS";
我正在尝试编译(通过Hardhat)一个契约,该契约导入了几个具有不同可靠版本的接口,但我得到了以下错误: Error HH606: The project cannot be compiled, see reasons below.
These files and its dependencies cannot be compiled with your config. This can happen because they have incompatible Solidity pragmas, or don't match any of your configured Sol
我使用的是混合IDE,我得到了以下错误:
Internal exception in StandardCompiler::compileInternal: /src/libsolidity/ast/ASTJsonConverter.cpp(791): Throw in function string dev::solidity::ASTJsonConverter::functionCallKind(dev::solidity::FunctionCallKind)
Dynamic exception type: N5boost16exception_detail10clone_implI
我使用的是这个版本的solidity,pragma solidity >=0.4.22 <0.9.0;
每当我编译truffle时,我都会得到这个TypeError: Member "length"。当我将版本改为0.4.0时,错误就消失了,但是我不能使用这个版本。我需要使用此pragma solidity >=0.4.22 <0.9.0;
下面是错误:
TypeError: Member "length" is read-only and cannot be used to resize arrays.
--> pr