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
amount_after_nonexistent_view.tz
# This contract calls the non-existent view on the address
# passed as parameter. After returning from the view it
# stores it's AMOUNT.
parameter address ;
storage mutez;
code
     { CAR ;
       DUP ;
       PUSH nat 0 ;
       VIEW "nonexistent" (pair nat nat) ;
       ASSERT_NONE ;
       CONTRACT nat ;
       ASSERT_SOME ;
       PUSH mutez 15000000 ;
       PUSH nat 0 ;
       TRANSFER_TOKENS ;
       AMOUNT;
       SWAP ;
       NIL operation ;
       SWAP ;
       CONS ;
       PAIR
     } ;
back to top