Commit a152ebf0 authored by John Burnham's avatar John Burnham

chapter 03

parent 22185c82
......@@ -141,8 +141,7 @@ $ ./alphanet.sh client typecheck script container:helloTezos.tz --details
This program should typecheck, but if it doesn't, possible reasons are
if the file was copied incorrectly, or if there have been breaking changes to
the Michelson semantics since this document was published. If the latter, please
submit an issue at [TODO: add LINK].
the Michelson semantics since this document was published.
## Running scripts
......@@ -177,10 +176,12 @@ Congratulations, you've just run your first smart contract in Michelson!
Now let's get into the details of how the contract works:
All Michelson smart contracts are functions that take two arguments, an input
parameter and a storage value, and return a pair of a list of operations and a
storage value. The storage value is effectively a return value, and the list of
operations are like a continuation, if, for example, the contract was called by
another contract.
parameter and a storage value, and return a pair of a list of network operations
and a storage value. The storage value is effectively a return value, and the
list of network operations are the effects (such as a transaction, delegation,
or new contract creation) the contract will emit onto the Tezos network. You can
think of a contract's return value as the pair of how the contract mutates the
global blockchain state and how the contract mutates its own state.
There are many different ways to notate types signatures but here's what the
Michelson type signature of a contract looks like:
......
parameter string;
storage string;
code {CAR; NIL operation; PAIR;};
This diff is collapsed.
parameter string;
storage address;
code { DUP;
DUP;
CDR;
CONTRACT string;
IF_NONE {DROP; NIL operation }
{SWAP;
CAR;
DIP {PUSH mutez 0};
TRANSFER_TOKENS;
DIP {NIL operation;};
CONS;
};
DIP { CDR };
PAIR;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment