Skip to main content

Exam



Question 1#

What is correct about LIGO?







Question 2#

What notions are defined inside the smart contract?










Question 3#

What is returned by the execution of a smart contract?










Question 4#

What is the right way to define a variable?









Question 5#

What is the right way to define a constant?









Question 6#

Which of the following operations are correct?










Question 7#

What is correct about type aliasing?







Question 8#

What is a set?







Question 9#

What is a record?







Question 10#

Consider the following smart contract.

type counterStorage is int
type counterEntrypoints is Increment of int | Decrement of int
type counterReturn is ########
function increment(const param : int; const s : counterStorage) : counterReturn is
block { skip } with ((nil: list(operation)), s + param)
function decrement(const param : int; const s : counterStorage) : counterReturn is
block { skip } with ((nil: list(operation)), s - param)
function main(const ep : counterEntrypoints; const store : counterStorage) : counterReturn is
block {
const ret : counterReturn = case ep of
| Increment(p) -> increment(p, store)
| Decrement(p) -> decrement(p, store)
end;
} with ret

Complete the ######## part in the code to give the return type of the main function a correct definition. (More than one answer may be valid)







Which of the following proposals is called an entrypoint for this smart contract?









What command lines are correct for this smart contract? (Assume that the smart contract is stored in a file counter.ligo)













Last updated on by Aymeric BETHENCOURT