Monday, September 11, 2017

Ethereum Solidity Compiler

Ethereum contracts are written in the high level language called Solidity and compiled into bytecode using the Solidity compiler. This bytecode is then uploaded on to the blockchain.

As mentioned in the previous blog, Visual Studio Code and several editors provide integrated environment to compile the code. If you want to manually run the compiler then here are the steps for compiling a smart contract.

Download the compiler from the GitHub release site
Based on your platform download the corresponding bits

Open the command line and run the below command to compile our 0xService or any smart contract
%path%\solc.exe --bin --abi --overwrite -o bin Service.sol

As you see in the above we are passing bin and abi arguments to specify to the compiler to create the bin and abi file. The generated files are created in the bin folder as mentioned by the other bin attribute. The overwrite flag is used to overwrite the previously generated abi and bytecodes.

Tuesday, September 5, 2017

0x Services Objective & Requirements

Below are the objective and requirements of 0x platform

Provide a decentralized platform where a client can post a service request and a provider or contractor perform the service in a trustless environment and with escrow payment system.

  • Register and create an account with 0x. 0x creates an user account in Ethereum chain
  • Post a service request in 0x and set its price in Ether or 0x tokens. 0x creates a smart contract on Ethereum chain
  • 0x charges a small amount of fee for creating the contract, this is in addition to the gas required by Ethereum chain. This fee will be paid through 0x tokens
  • Negotiate the price of the service with the provider (out of scope for POC)
  • The contract acts as the escrow account. Fund the contract with the agreed service amount. This funding can be done through Ether or 0x tokens.
  • Once the work is complete authorize payment to the contractor.
  • Settle disputes with help of arbiter

  • Register and create an account with 0x. 0x creates an user account in Ethereum chain
  • Apply for a service
  • Perform the requested service (outside of 0x)
  • Request payment for the service
  • Receive payment to the account
  • Raise arbitration if the payment is not received

  • Settle the dispute and authorize the payment from escrow account.
  • 0x acts as the default arbiter. The client can choose his own arbiter.

The below are the out of scope requirements for the current implementation and these can be taken up at a later time.
  • Terms and Conditions of the work which will be checked before the payment is made
  • Termination procedure
  • Intermediate payment or payment schedule where the contractor gets payments based on the payment terms