How do I compile a solidity file (e.g. 05_greeter.sol
) from the command-line into bytecode?
Without using IDE such as Mix.
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityHow do I compile a solidity file (e.g. 05_greeter.sol
) from the command-line into bytecode?
Without using IDE such as Mix.
Instructions are well documented here, the steps would be
eth.compile.solidity("")
source = "contract test { function multiply(uint a) returns(uint d) { return a * 7; } }"
contract = eth.compile.solidity(source).test
.sol
files directlySee How to load Solidity source file into geth. Or you can use tools like Truffle to deploy it. In truffle you can create a contract and deploy it via commands.