BCD

Tezos Contract Explorer
Search Networks Deploy
  • Home
  • /
  • Mainnet
  • /
  • Tezos Domains NameRegistry SetChildRecord
operations (13.9K)Storage Code Interact Tokens Metadata Fork Statistics Details
Latest
​x
49
 
1
parameter (or
2
            (lambda %proxy_admin_update
3
              (pair (pair (address %contract) (big_map %metadata string bytes))
4
                    (address %owner))
5
              (pair (list operation)
6
                    (pair (pair (address %contract) (big_map %metadata string bytes))
7
                          (address %owner))))
8
            (pair %set_child_record (bytes %label)
9
                                    (pair (bytes %parent)
10
                                          (pair (option %address address)
11
                                                (pair (address %owner)
12
                                                      (pair (map %data string bytes)
13
                                                            (option %expiry timestamp)))))));
14
storage (pair (pair (address %contract) (big_map %metadata string bytes))
15
              (address %owner));
16
code { UNPAIR ;
17
       IF_LEFT
18
         { SWAP ;
19
           DUP ;
20
           DUG 2 ;
21
           CDR ;
22
           SENDER ;
23
           COMPARE ;
24
           EQ ;
25
           IF { SWAP ; EXEC } { DROP 2 ; PUSH string "NOT_AUTHORIZED" ; FAILWITH } }
26
         { SWAP ;
27
           DUP ;
28
           CAR ;
29
           CAR ;
30
           DIG 2 ;
31
           PACK ;
32
           PUSH string "SetChildRecord" ;
33
           DIG 2 ;
34
           CONTRACT %execute (pair (string %action_name)
35
                                   (pair (bytes %payload) (address %original_sender))) ;
36
           IF_NONE
37
             { DROP 2 ; PUSH string "INVALID_CONTRACT" ; FAILWITH }
38
             { SENDER ;
39
               DIG 3 ;
40
               PAIR ;
41
               DIG 2 ;
42
               PAIR ;
43
               NIL operation ;
44
               DIG 2 ;
45
               AMOUNT ;
46
               DIG 3 ;
47
               TRANSFER_TOKENS ;
48
               CONS } ;
49
           PAIR } }