Local Environment

Contracts can be created and verified very easily by using BrowserSolidity.

Create Contract

Verify with BrowserSolidity

  1. Description of Contract

    Implement "HelloWorld" Contract as below.

    contract HelloWorld {
       string private greeting;
       function getGreeting() constant returns(string) {
           return greeting;
       function setGreeting(string _greeting) {
           greeting = _greeting;
  2. Instantiating (Deploying) Contracts

    When creating this contract, as in most object-oriented languages, an instance is created and the instance is given an address.

    (To be precise, it is deployed on a virtual Ethereum network running within a JavaScriptVM and and an Ethereum address is allocated.)

    Click "Create" on the right side of the screen to deploy.


    Contract is deployed and address


    has been allocated. The gas etc. used at that time is also displayed.


  3. Set a value on the instance

    Set a value for the generated contract instance.

    In the entry field of 'setGreeting'

    "Hello World"

    Enter and press 'setGreeting'.

    Hello World

  4. Get the value from instance

    Retrieve the value from the contract instance.

    Press 'getGreeting'.

    Get Hello World

    1. string: Hello World

    As it turns out, "Hello World" is set.

    In this way you can check the deployment and operation of a Contract on the JavaScript VM.

results matching ""

    No results matching ""