安裝intelliJ IDEA2018.3
2.在網盤開發軟件下載JetbrainsCrack_jb51.rar軟件,里面包含了JetbrainsCrack-4.2-release-enc.jar文件。
posted on 2019-06-11 09:33 狼愛上貍 閱讀(256) 評論(3) 編輯 收藏 所屬分類: Blockchain
我胡漢三又回來了
posted on 2019-06-11 09:33 狼愛上貍 閱讀(256) 評論(3) 編輯 收藏 所屬分類: Blockchain
6 為了能在IDEA里編譯sol智能合約文件,需要安裝nodejs文件,下載地址:
https://nodejs.org/en/download/
7.安裝后,cmd -> powershell
8.npm install --global --production windows-build-tools
9.npm install -g solc
10.命令行里輸入solcjs輸出Must provide a file.即為成功。 回復 更多評論
11.配置IDEA。打開File-Setting-Tools--External Tools,右邊區域點擊+號
12.Name:solidity
Program:solcjs.cmd
Arguments:--abi --bin $FileName$ -o $FileDir$
Working directory:$FileDir$
13.輸入:
pragma solidity ^0.5.9;
contract HelloWorld{
string public name = "jonson";
function getName() public view returns(string memory){
return name;
}
function changeName(string memory _name) public{
name = _name;
}
function testPure(uint a,uint b) public pure returns(uint){
return a+b;
}
}
14.Tools-External Tools->solidity
15.輸出結果:
Process finished with exit code 0
16.在C:\Users\Administrator\IdeaProjects\1下,多了2個文件,test_sol_HelloWorld.abi和test_sol_HelloWorld.bin文件,即為成功。 回復 更多評論
只有注冊用戶登錄后才能發表評論。 | ||
![]() |
||
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
|
||
相關文章:
|
||