How to view memo of a incoming transactions?

How to view the memo of an incoming transaction on CLI? I tried with chia wallet get_transactions & chia wallet get_transaction -tx but it didn’t work.

If you use the verbose flag you’ll get the entire JSON of the transaction, including memos.

chia wallet get_transaction -tx 0xblahblah -v

chia wallet get_transaction -tx 0x1add0882c99f687f0f6acd1855c3139e3baccba2b3a8a8cea38c76ed7506f26f -v
{'additions': [{'amount': 1,
                'parent_coin_info': '0x276d6ab6b9c5cebe98d06dc707c3a27d5fca4a38c1a8d545d8d5dff3943ceb77',
                'puzzle_hash': '0xeff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9'},
               {'amount': 9999999999901,
                'parent_coin_info': '0x276d6ab6b9c5cebe98d06dc707c3a27d5fca4a38c1a8d545d8d5dff3943ceb77',
                'puzzle_hash': '0xbe2e78bcf25bc3f5f5977674db5fcbc6c1bffc2e588994633ba73cca1c6fbdfa'}],
 'amount': 1,
 'confirmed': True,
 'confirmed_at_height': 1404106,
 'created_at_time': 1660861360,
 'fee_amount': 10,
 'memos': [],
 'name': '0x1add0882c99f687f0f6acd1855c3139e3baccba2b3a8a8cea38c76ed7506f26f',
 'removals': [{'amount': 9999999999912,
               'parent_coin_info': '0x1e26bbd6daefd9059a4c1cd7ea60cd053775c2082c796738e1be0959e1c29ca6',
               'puzzle_hash': '0xcf62eb427a0351a6fbdfd6c18b61a6b3a39667941e8cf9f1e90985802059ac55'}],
 'sent': 0,
 'sent_to': [],
 'spend_bundle': None,
 'to_puzzle_hash': '0xeff07522495060c066f66f32acc2a77e3a3e737aca8baea4d1a64ea4cdc13da9',
 'trade_id': None,
 'type': 1,
 'wallet_id': 1}

I tried this but it doesn’t work. The memo field is empty

We don’t support this yet, but is planned.

What you need to do is:

  • fetch the coin spend of the the parent
  • run the spend and parse the conditions
  • find the condition that creates your coin
  • check the last item in the list, which should be a list of hints and memos

Ah. I guess I never tried it with an actual memo.