(mod ((GRANDPARENT_VALIDATION_PUZZLE_HASH PARENT_VALIDATION_PUZZLE_HASH MOVE SPLIT AMOUNT TIMEOUT ACCUSED_PUZZLE_HASH ACCUSER_PUZZLE_HASH) . args) (include *standard-cl-21*) (include assert.clinc) (include condition_codes.clinc) (include curry.clinc) (include sha256tree.clinc) (include shatree.clinc) (defconstant timeout 0) (defconstant defend 1) (defmacro prefix_list ARGS (defun compile-prefix-list (args) (if args (if (r args) ;; We have at least 2 things left... recurse once. (qq (c (unquote (f args)) (unquote (compile-prefix-list (r args))))) ;; This is the last item, so we return it whole (improper list form). (qq (unquote (f args))) ) 0 ) ) (compile-prefix-list ARGS) ) (if args ;; defend (let ((GRANDPARENT_VALIDATION_PROGRAM (f args)) (justification (f (r args)))) (assert (= (shatree GRANDPARENT_VALIDATION_PROGRAM) GRANDPARENT_VALIDATION_PUZZLE_HASH) (prefix_list (list CREATE_COIN ACCUSED_PUZZLE_HASH AMOUNT) (list CREATE_COIN_ANNOUNCEMENT 0) (a GRANDPARENT_VALIDATION_PROGRAM (list AMOUNT MOVE SPLIT PARENT_VALIDATION_PUZZLE_HASH justification)) ) ) ) ;; timeout (list (list ASSERT_SECONDS_RELATIVE TIMEOUT) (list CREATE_COIN ACCUSER_PUZZLE_HASH AMOUNT) (list CREATE_COIN_ANNOUNCEMENT 0) ) ) )