Ethereum and Solidity: The journey begins

Ethereum and Solidity: The journey begins

Currently, cryptocurrency is the talk of the town and it is on the rise. Fortunately, I stumbled upon a beginner's course in Ethereum and Solidity and it got me fascinated. Here are a few things that I am learning:

1. A metamask account

I require an account where I can play with ether. So, first things first is to create one account

2. Different networks linked to one account

I have got one account which comprises of address, public key and private key and it is linked to different networks which are not connected in any way. Currently, the networks that I can access are: Ethereum Mainnet, Ropstan, Kovan and Rinkeby. Rinkeby is a test network which I can use for coding purposes.

3. Blockchain

I just got the gist of block chaining here which is total sum value to be less than a particular number and if any entries is changed than from that point, it again needs to be remined. This was kind of cool.

blockchain-3277336_1280.png

4. Solidity

I just started coding on remix.ethereum.org which is an online IDE. Here, coding is done on .sol files and the syntax is similar to javascript. Here is my first code:

pragma solidity ^0.4.17;

contract Inbox{
    string public message;

    function Inbox(string initialMessage) public{
        message = initialMessage;
    }

    function setMessage(string newMessage) public{
        message = newMessage;
    }

    function getMessage() public view returns(string){
        return message;
    }
}

Here, pragma solidity gives the version of compiler that I am using. contract is similar to classes here and functions are supposed to perform an activity with or without taking any input parameters.

Well, that's it for now folks. Adios!