November 2018
Intermediate to advanced
528 pages
13h 21m
English
If you love compiling and running code using command lines, you can use the Solidity compiler, solc. To use the latest stable version of the Solidity compiler, run the following:
sudo apt-get updatesudo apt-get install solc
Start by copying the contract code into a file named auction.sol, and afterwards run the following command to compile the contract and generate the needed ABI and bytecode. The output will be saved in a details.js file as follows:
echo "var ContractDetails=`solc --optimize --combined-json abi,bin auction.sol`" > details.js
If you see a set of warnings, neglect them and then run in succession the following commands in your Geth CLI, in succession:
loadScript(“your Path/details.js”) ...
Read now
Unlock full access