https://gitlab.com/tezos/tezos
Raw File
Tip revision: 946045f0fd19b10f0419990eee290306edc15077 authored by Nic Volanschi on 28 April 2023, 14:15:13 UTC
doc: explain the default role in the doc guidelines
Tip revision: 946045f
sets.tz
parameter unit;
storage unit;
code
  {
    DROP;

    # Numerical types
    PUSH (set nat) {0; 1; 3}; DROP;
    PUSH (set int) {-1 ; 0; 3}; DROP;
    PUSH (set mutez) {1; 4; 5; 10; 1923}; DROP;
    PUSH
      (set timestamp)
      {-1; 0; "2017-09-16T08:38:04Z"; "2019-09-16T08:38:05Z"};
    DROP;

    # Booleans
    PUSH (set bool) {}; DROP;
    PUSH (set bool) {True}; DROP;
    PUSH (set bool) {False}; DROP;
    PUSH (set bool) {False; True}; DROP;

    # Strings and bytes
    PUSH (set string) {""; "A"; "B"; "a"; "aa"; "b"}; DROP;
    PUSH (set bytes) {0x; 0x01; 0x02; 0xAABBCC}; DROP;

    # Addresses
    PUSH
      (set key_hash)
      { "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx";
        "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv" };
    DROP;
    PUSH
      (set address)
      { "tz1KqTpEZ7Yob7QbPE4Hy4Wo8fHG8LhKxZSx";
        "tz1ddb9NMYHZi5UzPdzTZMYQQZoMub195zgv";
        "KT1TZCh8fmUbuDqFxetPWC2fsQanAHzLx4W9"};
    DROP;

    UNIT; NIL operation; PAIR;
  }
back to top