Chapter 1: Elementary

Lesson 1: Contract Declaration

We begin with the basics. First of all, we will need to specify which Scilla version we are working with. At the moment of writing, Scilla is at version 0.2.0. We only need to be concerned with the first digit of the version, which is 0 here.

Now, we can start with the main part of the smart contract coding. The contract that you will be deploying to the blockchain has to have a name by which it could later be identified. We use contract and replace the ContractName with the actual name for the contract.

Please note that the contract name must start with a capital letter.

1

scilla_version 0

We have a task for you!

  • Begin with the version declaration of Scilla as shown in the lesson.
  • Then, in next line, declare a contract which should be called SocialMediaPayment.
  • Your Workspace

    Show Solution

    Solution

    1

    2

    3

    4

    (* Start typing from the line below. *)
    scilla_version 0
    contract SocialMediaPayment
    (* Start typing from the line below. *)
    1