trgarrett / chialisp

Chialisp Puzzles and Drivers
Apache License 2.0
13 stars 5 forks source link

why is the create_coin memo the same as the create_coin puzzle_hash? #5

Open geraldneale opened 1 year ago

geraldneale commented 1 year ago

I'm looking at the output of these puzzles in my wallet and finding it really hard to understand the origin. I have several different project using these puzzles and can't tell payments from one versus the other. The memo, since it is in the wallet, seems like an obvious opportunity to carry an ID for the project, but currently it is valued with the create_coin puzzle_hash and unless I use a specific payout wallet address for each project I can't tell one from the other.

trgarrett commented 1 year ago

This was on the advice of CNI developers that it would be far easier for wallets to keep track of CATs if they are hinted with the puzzlehash. Because of the way CAT puzzles are layered, the hash you send to in the CREATE_COIN is not the same as the puzzlehash that ultimately protects the coins. Because all of the existing tax software is based on addresses, I opted to pick an unused derivation index and address in my wallet for each project to keep track of them. That way I can easily bookmark them on a blockchain explorer and see which ones have momentum.

The first memo has a special status as a "hint" but there is the option to add additional memos after the first one that lack this status. That is a feature we could explore using in the future.