<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mojopuzzler.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Tutorial_Hints</id>
	<title>Tutorial Hints - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mojopuzzler.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Tutorial_Hints"/>
	<link rel="alternate" type="text/html" href="https://mojopuzzler.org/mediawiki/index.php?title=Tutorial_Hints&amp;action=history"/>
	<updated>2026-05-26T03:42:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://mojopuzzler.org/mediawiki/index.php?title=Tutorial_Hints&amp;diff=1112&amp;oldid=prev</id>
		<title>Gneale: Created page with &quot;From the document:  '''How to communicate between coins using announcements'''  https://docs.google.com/document/d/19KM73gW_Klyk477Ux3Tf5DcKzkWhlsq84e1OiVaVZp4/edit  &lt;h2&gt;Three basic steps&lt;/h2&gt; # Setup and seed the trigger coin # Setup and seed the trigger'''d''' coin # Create and execute the spend bundle    &lt;h2&gt;Step 1&lt;/h2&gt; * Create new directory &quot;coin announcement&quot; and add a blank text file to use as a scratch pad(puzzle hashes for repetitive use and debugging etc). * Cr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mojopuzzler.org/mediawiki/index.php?title=Tutorial_Hints&amp;diff=1112&amp;oldid=prev"/>
		<updated>2023-11-16T18:16:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;From the document:  &amp;#039;&amp;#039;&amp;#039;How to communicate between coins using announcements&amp;#039;&amp;#039;&amp;#039;  https://docs.google.com/document/d/19KM73gW_Klyk477Ux3Tf5DcKzkWhlsq84e1OiVaVZp4/edit  &amp;lt;h2&amp;gt;Three basic steps&amp;lt;/h2&amp;gt; # Setup and seed the trigger coin # Setup and seed the trigger&amp;#039;&amp;#039;&amp;#039;d&amp;#039;&amp;#039;&amp;#039; coin # Create and execute the spend bundle    &amp;lt;h2&amp;gt;Step 1&amp;lt;/h2&amp;gt; * Create new directory &amp;quot;coin announcement&amp;quot; and add a blank text file to use as a scratch pad(puzzle hashes for repetitive use and debugging etc). * Cr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;From the document:&lt;br /&gt;
&lt;br /&gt;
'''How to communicate between coins using announcements'''&lt;br /&gt;
&lt;br /&gt;
https://docs.google.com/document/d/19KM73gW_Klyk477Ux3Tf5DcKzkWhlsq84e1OiVaVZp4/edit&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Three basic steps&amp;lt;/h2&amp;gt;&lt;br /&gt;
# Setup and seed the trigger coin&lt;br /&gt;
# Setup and seed the trigger'''d''' coin&lt;br /&gt;
# Create and execute the spend bundle&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Step 1&amp;lt;/h2&amp;gt;&lt;br /&gt;
* Create new directory &amp;quot;coin announcement&amp;quot; and add a blank text file to use as a scratch pad(puzzle hashes for repetitive use and debugging etc).&lt;br /&gt;
* Create file trigger.clvm using the following code from the tutorial:&lt;br /&gt;
&lt;br /&gt;
 (mod (mess new_puzhash amount)&lt;br /&gt;
     (defconstant CREATE_COIN 51)&lt;br /&gt;
     (defconstant CREATE_COIN_ANNOUNCEMENT 60)&lt;br /&gt;
  &lt;br /&gt;
     (list &lt;br /&gt;
         (list CREATE_COIN new_puzhash amount)&lt;br /&gt;
         (list CREATE_COIN_ANNOUNCEMENT (sha256 mess)))&lt;br /&gt;
     )&lt;br /&gt;
 )&lt;br /&gt;
* Output a puzzle hash for it&amp;lt;code&amp;gt;cdv clsp treehash trigger.clvm&amp;lt;/code&amp;gt;. Send 1 mojo to seed the trigger coin&amp;lt;code&amp;gt;chia wallet send -a 0.000000000001 -t xch123456aedcfb98765aaaaa11111111&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;h2&amp;gt;Step 2&amp;lt;/h2&amp;gt;&lt;br /&gt;
* Create file trigger'''d'''.clvm using the following code from the tutorial:&lt;br /&gt;
&lt;br /&gt;
 (mod (sign_coin_id new_puzhash amount)&lt;br /&gt;
    (defconstant CREATE_COIN 51)&lt;br /&gt;
    (defconstant ASSERT_COIN_ANNOUNCEMENT 61)&lt;br /&gt;
 &lt;br /&gt;
    (list &lt;br /&gt;
        (list CREATE_COIN new_puzhash amount) &lt;br /&gt;
        (list ASSERT_COIN_ANNOUNCEMENT (sha256 sign_coin_id (q . 0x2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824)))&lt;br /&gt;
    )&lt;br /&gt;
 )&lt;br /&gt;
* Output a puzzle hash for it. Send 1 mojo to seed the trigger'''d''' coin.&lt;br /&gt;
&amp;lt;h2&amp;gt;Step 3&amp;lt;/h2&amp;gt;&lt;br /&gt;
* Create a file spend_bundle.json. Copy and paste the spend_bundle json code from the tutorial. NOTE: change &amp;quot;coin_solutions&amp;quot; to &amp;quot;coin_spends&amp;quot; to avoid warning that would occur at push_tx.&lt;br /&gt;
* Update spend_bundle.json file: the first and second coins' amount, parent_coin_info, and puzzle_hash based on the two coins you earlier seeded.&lt;br /&gt;
* Create serialized puzzle_reveal from trigger.clvm and update spend_bundle.json file with that value. HINT: &amp;lt;code&amp;gt;cdv clsp build trigger.clvm&amp;lt;/code&amp;gt; and look into the resulting dot hex file.&lt;br /&gt;
* Create a file for the trigger coin solution tsolution.clvm using the following code modified from the tutorial. NOTE: you must put your own wallet's puzzle hash:&lt;br /&gt;
&amp;lt;code&amp;gt;(q . (hello 0x656214f18f80a85a30f97cafa0fdfd29578d5e8030316b21e36552f9172c49d1 1))&amp;lt;/code&amp;gt;. Create serialized solution for tsolution.clvm and update spend_bundle.json file with that value.&lt;br /&gt;
* Create serialized puzzle_reveal for trigger'''d'''.clvm and update spend_bundle.json file with that value. HINT: &amp;lt;code&amp;gt;cdv clsp build triggerd.clvm&amp;lt;/code&amp;gt; and look into the resulting dot hex file.&lt;br /&gt;
* Create a file for the trigger'''d''' coin solution tsolution'''d'''.clvm using the following code modified from the tutorial. NOTE: you must put ***valid coin ID of the trigger coin you created*** and your own wallet's puzzle hash):&lt;br /&gt;
&amp;lt;code&amp;gt;(q . (0x7275ff0dc3007d5b87b2ab06388d40a6577393bae214d24324bf3c9179273a9a 0x656214f18f80a85a30f97cafa0fdfd29578d5e8030316b21e36552f9172c49d1 1))&amp;lt;/code&amp;gt; Create serialized solution for tsolution.clvm and update spend_bundle.json file with that value.&lt;br /&gt;
* Attempt to spend the coins in unison with &amp;lt;code&amp;gt;cdv rpc pushtx ./spend_bundle.json&amp;lt;/code&amp;gt;. The response you are looking for is &amp;quot;{'status': 'SUCCESS', 'success': True}&amp;quot; and you can watch the coins incoming into your wallet to verify success.&lt;br /&gt;
* If it fails try debugging with &amp;lt;code&amp;gt;cdv inspect spendbundles ./spend_bundle.json -db&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gneale</name></author>
	</entry>
</feed>