I'am building a local blockchain using etherium.I wrote a smart contract "Hello" that allows to display a phrase. when I execute truffle.compile an error occurs: No visibility specified. Did you intend to add "public"?
pragma solidity ^0.4.15;
contract Hello{
string public message;
function Hello() {
message = "Hello, World : This is a Solidity Smart Contract on the Private Ethereum Blockchain ";
}
}
Run Code Online (Sandbox Code Playgroud)
Compiling ./contracts/Hello.sol
Compiling ./contracts/Migrations.sol
/home/mohamed/Projects/Stage/Truffle/contracts/Hello.sol:1:1: SyntaxError: Source file requires different compiler version (current compiler is …Run Code Online (Sandbox Code Playgroud) 我想在我的本地网络上部署智能合约。我通过执行本地节点
PRIVATE_CONFIG=ignore nohup geth --datadir ./Node1/new-
node-1
--nodiscover --verbosity 5 --networkid 31337 --raft --
raftport 51001 --rpc --rpcaddr 0.0.0.0 --rpcport 22101 --
rpcapi
admin,db,eth,debug,miner,net,shh,txpool,personal,web3,
quorum,raft --emitcheckpoints --port 21101 2>>node1.log &
Run Code Online (Sandbox Code Playgroud)
我必须使用 localhost:\127.0.0.1:21101 或 22101?我想知道这两个端口之间的区别以及用途?
如果您不介意的话,还有一个问题:当我使用端口 21101 时,它无法连接,当我查阅节点日志时,我发现:
Failed RLPx handshake addr=[::1]:42552 conn=inbound
err="read tcp [::1]:21102->[::1]:42552: i/o timeout"
Run Code Online (Sandbox Code Playgroud)