https://gitlab.com/tezos/tezos
Raw File
Tip revision: 73b629b111297f84a04e61b6523dcd09dc7404a0 authored by Valentin Chaboche on 30 March 2023, 08:31:30 UTC
Scoru,Proto: forbid double publish
Tip revision: 73b629b
create_contract_rootname.tz
parameter (or key_hash address);
storage unit;
code { CAR;
       IF_LEFT
         { DIP { PUSH string "dummy";
                 PUSH mutez 100000000 ; PUSH bool False ;
                 PUSH bool False ; NONE key_hash } ;
           CREATE_CONTRACT
             { parameter (string %root) ;
               storage string ;
               code { CAR ; NIL operation ; PAIR } } ;
           DIP { RIGHT key_hash ; DIP { SELF ; PUSH mutez 0 } ; TRANSFER_TOKENS ;
                 NIL operation ; SWAP ; CONS } ;
           CONS ; UNIT ; SWAP ; PAIR }
         { SELF ; ADDRESS ; SENDER ; IFCMPNEQ { FAIL } {} ;
           CONTRACT string ; IF_SOME {} { FAIL } ;
           PUSH mutez 0 ; PUSH string "abcdefg" ; TRANSFER_TOKENS ;
           NIL operation; SWAP; CONS ; UNIT ; SWAP ; PAIR } };
back to top