- Docs
- Developers
- Developer tools FAQs
Developer Tools FAQs
In this section we address some common questions that developers using the archway tools may have.
How can i limit a query to transactions sent from a specific address?
You can filter with the Archway daemon using the following:
mainnet
testnet
archwayd query txs --events 'wasm._contract_address=<contract-address>&message.sender=<address>' --node https://rpc.mainnet.archway.io:443
You can also filter based on the RPC API query using the following:
mainnet
testnet
https://rpc.mainnet.archway.io/tx_search?query=message.sender=<address>ANDmessage.action=/cosmwasm.wasm.v1.MsgInstantiateContract&order_by=desc
How can I query the bank module and filter for a particular action type?
You can use the events flag and filter events based on various actions, for example:
mainnet
testnet
archwayd query txs --events 'message.action=/cosmos.bank.v1beta1.MsgSend' --node https://rpc.mainnet.archway.io:443
Try it:
archwayd query txs --events 'message.action=/cosmos.bank.v1beta1.MsgSend' --node https://rpc.mainnet.archway.io:443
How can I convert an address from one network to another?
You can get a network address from an address of a different network via Javascript using the CosmosJS library @cosmjs/encoding which you can find inside the arch3js. The following code snippet shows how to convert from a JUNO address to Archway:
import { fromBech32, toBech32 } from ""@cosmjs/encoding""const { data } = fromBech32('juno1xxxyyy...')const archwayAddress = toBech32('archway', data)"
How can I query paginated data?
To query paginated data, append the --page 1 flag to the command for the page you required, where 1 in this example signifies the first page. By default 100 records are returned per page.
How can I output data in JSON format?
To output data in a JSON format, you can append the --output "json" flag to the command.