Sample file download

Sample Solidity script (.sol)

Solidity is a contract-oriented, high-level language whose syntax is similar to that of JavaScript and it is designed to target the Ethereum Virtual Machine.

Here is the file type:

$ file sample.sol
sample.sol: ASCII text

To compile the file you can use Remix:

var browser_ballot_sol_sampleContract = web3.eth.contract([]);
var browser_ballot_sol_sample = browser_ballot_sol_sampleContract.new(
   {
     from: web3.eth.accounts[0],
     data: '0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a72305820da2bc54c35b72ab9ab64750f5d7bb133811b4f3409b82da015ca10184b0967c80029',
     gas: '4700000'
   }, function (e, contract){
    console.log(e, contract);
    if (typeof contract.address !== 'undefined') {
         console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash);
    }
 })

Sample Solidity file: download here.

More information on Solidity

Tags:

Top Site Counter