green-app.io
Search
⌃K
🌱

Chialisp

Chialisp is a high-level, LISP-like language for implementing smart-contract capabilities called puzzles on Chia. Chialisp program compiles into Chialisp Virtual Machine (CLVM). CLVM is serialized and stored directly on the blockchain and is a matter of consensus; it can never be changed. While CLVM powers Chialip, they share many fundamental concepts.
; This is a "genesis checker" for use with cc.clvm.
;
; This checker allows new CATs to be created if they have a particular coin id as parent
;
; The genesis_id is curried in, making this lineage_check program unique and giving the CAT it's uniqueness
(mod (
GENESIS_ID
Truths
parent_is_cat
lineage_proof
delta
inner_conditions
_
)
​
(include cat_truths.clib)
​
(if delta
(x)
(if (= (my_parent_cat_truth Truths) GENESIS_ID)
()
(x)
)
)
​
)
​
You can learn more about the Chialisp language at this link.