Cancel mojo technique

From mojo_puzzler
Revision as of 15:55, 17 November 2023 by Gneale (talk | contribs) (Created page with "===== Return to: Chialisp ===== The following chialisp code ensure that the introduced parent puzzlehash of the parent coin is correct first, before sending the rebate coin which is restricted to that one possible wallet address: (mod (pwd ppid pph pamt ph amt) (defconstant CREATE_COIN 51) (defconstant ASSERT_MY_PARENT_ID 71) (if (= pwd (q . cancel)) (list (list ASSERT_MY_PARENT_ID (sha256 (concat ppid pph pamt))) (list CREATE_CO...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Return to: Chialisp

The following chialisp code ensure that the introduced parent puzzlehash of the parent coin is correct first, before sending the rebate coin which is restricted to that one possible wallet address:

 (mod (pwd ppid pph pamt ph amt)
    (defconstant CREATE_COIN 51)
    (defconstant ASSERT_MY_PARENT_ID 71)
    (if (= pwd (q . cancel))
    (list (list ASSERT_MY_PARENT_ID (sha256 (concat ppid pph pamt))) 
    (list CREATE_COIN pph amt))
    (if (= pwd (q . hello))
    (list (list CREATE_COIN ph amt))
    (x)
    )
    )
 )