Useful RUN examples
Return to: Chialisp
Example 1:
coinID == sha256(parent_ID + puzzlehash + amount)
run '(sha256 (concat 0xeb8c4d20b322be8d9fddbf9412016bdf00000000000000000000000000000022 0xa4cdba512b00c504ccc047b49d7688f1ad8b74d7859ef8d2ac2a81517d2d11a4 1750000000000))'
0x942754fd860bf64910f9394e298aae77ea4aff194e665d8a4475ef6f43b0ef0b
Example 2:
Announcement = (sha256 coinID message)
run '(sha256 (sha256 (concat 0xf1a59ca3a34226eb354536248ed11bd5ebda68ea369e62fb5cfc7bb290778d8c 0x60c27bc1af372be6944dc98a63a321d9dfd8abd764158d5fd1fb0825d611568e 1)) hello)'
0x4ae9b6db470e5c39ced02d9a541a97db8c5e961cd83820ccbb531ff68002188b
NOTE: It appears as if "concat" is unnecessary and doesn't change anything<double check this gneale 20220901>.