Halloween is finally here! Are you ready for the spookiest night of the year?

BUIDL IDE tools now has an upgraded UI just for Halloween. Trick or treat! A spooky pumpkin on the top welcomes you to the BUIDL’s Halloween.

Now, for developers, can you tell what the following code is for?

1
2
3
4
5
6
7
8
pragma lity ^1.2.4;

contract Halloween {
    
  function greet() pure public returns (string) {
    return "Happy Halloween";
  }
}

This is a very simple (yet spooky) smart contract example, just like the “Hello World” on the internet.

Let’s figure out how it works.

Start coding

Step 1

Open the BUIDL IDE tool in any browser. http://buidl.secondstate.io/

Step 2

Check the Providers tab on the left panel. The icon, if green, means BUIDL IDE is connected to the Second State DevChain. Please refresh the page if the icon is red.

Step 3

3.1 Clear the content in the contract editor section of BUIDL.

3.2 Copy and paste the following code to the contract section

1
2
3
4
5
6
7
8
pragma lity ^1.2.4;

contract Halloween {
    
  function greet() pure public returns (string) {
    return "Happy Halloween";
  }
}

3.3 Click on Compile and you will see the following. Then click on deploy on chain.

The contract is now deployed on the DevChain, and you could see the Contract Name , TX and Address on the left tab. (TX records this transaction and it is unique. So is the contract address.)

3.4 Now click open the Halloween contract, and click on the Call button to call its greeting() function. In the LOG window, you will see “Happy Halloween”.

That’s it. Happy Halloween on the blockchain!

About BUIDL IDE tools

BUIDL is a browser-based IDE that enables developers to create and deploy Decentralized Applications (DApps) on blockchains with ease.‪You can #compile, test, and deploy inside a browser. No software download!‬

Further reading: