Compile, deploy and execute the smart contract on the Conflux high-performance public chain in 5 minutes

Step 1.Install related packages

npm install -g solc truffle

Step 2.Download and unzip file

ConfluxContract.zip

Step 3.Write Contract

eg. Contract1.sol
pragma solidity >=0.4.23;
contract Contract1{
string _field;
function get()public view returns (string memory){
return _field;
}
function set(string memory field)public{
_field=field;
}
}

Step 4. Compile Contract and Deploy Contract

truffle compile ;& node .\helper\deploy.js {ContractName}

Step 5. Call Contract

node .\src\main.js

Video: Tutorial

1 Like

热烈庆祝 Conflux 成立2周年暨主网第二阶段Oceanus上线” 微信名 福 0x136b50120ff53702d0e0b15a7158c8c20f031070

热烈庆祝 Conflux 成立2周年暨主网第二阶段Oceanus上线” 奋斗 0x12029a02b89481ecb28a23cf7a4e7cec5da98abe