Extract transaction info via AppCall

Hi, I created a Smart Contract (dApp) which then associated an app_id and an app_address. What I do is to execute a transaction every certain time from a certain sender account and use the address of app_address as the destination address, where in the note field of the transaction I go to put some data that I want to store. I wanted to know if it was possible through an AppCall to be able to extract the note fields of all these transactions created. For example, create a certain application call that extracts the transaction notes and loads them in a global/local state so that I can be able to extract them easily. Through AlgoExplorer, by entering the app_id in the search field, I can see the history of all the operations from the “Application Usage” field.


I would therefore like to know if there are any methods that I can use from the AppCall code to be able to extract these transactions and then extract the note field.

You can’t search previous transactions with applications/tealcode on Algorand.

But you could use a python script to search transactions based on an address and notefield.

Here is an example (I’ll be using algoexplorer api services for this example - haven’t tested this)

from algosdk.v2client import indexer

indexerclient = indexer.IndexerClient("", "https://algoindexer.algoexplorerapi.io", {"User-Agent": "algosdk"})

transactions = indexerclient.search_transactions_by_address(your app address, note_field="transaction note goes here")

print(transactions)

This gets transactions by the address and notefield
transactions is a dictionary of the transactions.

If you remove the note_field param it won’t filter by notefield

1 Like