cosmjs
cosmjs copied to clipboard
Find all transactions from given contract
Hi,
I am trying to get all transactions from contract, something what in my opinion is very basic stuff, but I am struggling with this and cant find any information how to do it. Thats my code:
import { CosmWasmClient} from 'cosmwasm';
const contract = ".....";
const rpcEndpoint = "...";
const client = await CosmWasmClient.connect(rpcEndpoint);
const transactions = await client.searchTx({tags: [{key:"message.contract_address", value: contract}]})
I am getting 0 results. What am I doing wrong here? This "message.contract_address" is something I found in github but clearly doesnt work. Also, where can I find some examples with tags query? How can I know what to put in tag?
Best regards, Michał