Read "note" in transaction

Hi,

When account A submits a transaction to account B and writes sth in the “Note” field, how can it read the note from account B?

Thanks.

Welcome to Algorand!

It depends:

  • If by “read”, you mean that a smart contract can access this data: then this is possible only if the smart contract is executed in the same group of transactions as the transfer from A to B.
  • If by “read”, you mean that account B is owned by someone and this someone wants to read the note: then it is very easy, this person can go to a block explorer such as algoexplorer.io, look for their account, click on the transaction and see the note. You can see example of this with the ireport.algorand.org COVID dApp that sends transactions to itself and put information in the note. For example: Algorand Transaction

Thanks for your answer. I would mean the second “if” you explained. But if I want to read the note in the private network, not Mainnet or Testnet, I think I cannot use algoexplorer.io. Do you have any solution for this case, too?
Thanks

For a private network, you will need to run an indexer and then make a query to the indexer.

If you’re using Python see: Read and Write to the Transaction Note Field with Python | Algorand Developer Portal

There are similar tutorials in JS, Java, and Go, just search for them on the developer portal.

1 Like