1

So as the title says, I really need some help to query all the assets from a wallet address with the help of the cardano-cli.

So far I've got the cardano-node running with docker.

1 Answer 1

1

You can use cardano-cli query utxo --address <ADDRESS> --mainnet to check all UTXO's sitting at ADDRESS. ADA balances and policy/asset IDs will be output to STDOUT in the command line.

12
  • cardano-cli: Network.Socket.connect: <socket: 11>: does not exist (Connection refused)% This is what it says when I do it in a terminal on a fresh start. If I start cardano-node in another terminal it outputs : Command failed: query utxo Error: This query cannot be used for the Byron era I'm using this address: addr1q9klhtnsdqfmpfcdwxt426s2m489alzj8p55z8lq5p9a8e6uqudkzzl0x4pq0q79tx9ghxgcfkjtkugcx7qs0j445fpseuuu33 I run cardano-node with the following command: sudo docker run -e NETWORK=mainnet -v cardano-node-ipc:/ipc -v cardano-node-data:/data inputoutput/cardano-node
    – KatsuroDev
    May 11, 2022 at 23:33
  • Run cardano-cli query tip --mainnet and please comment whatever the terminal outputs. If you get an error, comment the error.
    – zhekson
    May 11, 2022 at 23:48
  • { "era": "Byron", "syncProgress": "32.67", "hash": "7149c856efa86edf5c8059fdf27fb81e2c77d53e62b2ad3357e3678566615a8f", "epoch": 110, "slot": 2386495, "block": 2384996 } Thanks for your help by the way! Appreciate it
    – KatsuroDev
    May 12, 2022 at 0:04
  • Your node is still syncing, and it is in the Byron era. In Byron there were no shelley-format addresses (ones that begin with addr1), so you can't query them because they don't yet exist in your local copy of the chain. Wait till the node is fully synced and then try the query utxo command again.
    – zhekson
    May 12, 2022 at 0:55
  • Thanks that worked! Now I'm getting this: query utxo --address addr1q9klhtnsdqfmpfcdwxt426s2m489alzj8p55z8lq5p9a8e6uqudkzzl0x4pq0q79tx9ghxgcfkjtkugcx7qs0j445fpseuuu33 --mainnet TxHash TxIx Amount -------------------------------------------------------------------------------------- Am I doing something wrong? I know the address has something, I've checked on pool.pm
    – KatsuroDev
    May 13, 2022 at 3:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.