Smart contract agent store data

Hi,
I have a question about store files.

  1. Is any useful information contained in “assets” and “holdings” store files, e.g. information about token balances?
  2. Is it possible to parse those files in a simple way? (maybe you can provide any tools for those purpose)

Yes, the assets files contain the information about each asset (token) and the holdings files hold the information about token balances for all holders. The CLI (command line interface) application smartcontract has a command state that will parse that data and print it in a human friendly format.

One more question. When “smartcontract” mark transaction as already spent? When i am trying to send 2 transactions in a row to the same contract, “smartcontract” trying to use as inputs the same trxs…

Our smartcontract CLI is pretty rough, as it is mainly meant for low level testing, so it requires some “hand holding” to work properly. You will need to run the sync --nostop, and let it run for a few seconds after it is in sync, between sending transactions for it to see unconfirmed txs in the mempool and mark their inputs as spent, as well as add the new UTXOs from them. Running just sync only pulls in confirmed txs.

Thank you for your answer, now I have 3 more questions :slight_smile:

  1. When I am running the sync --nonstop, of course, it’s running continuously. But when during sync I am trying to send transaction (e.g. contract offer) it can’t detect the inputs. What I am seen in the logs is “Loaded wallet with 0 outputs, 0 unspent, and balance of 0”. What can be wrong in my flow?

  2. Is any basic “wallet” with “Tokenized” support already exist? Basic transactions functionality and balance monitoring.

  3. If I want to exclude transaction signature process outside of the service that have blockchain wallet connection and who run “smartcontract” tools. Is it possible to build transaction without signature for future outside signing?

Thx.

  1. You don’t want to run the sync while running the CLI on another process. Only one should ever be running at a time. It stores data in memory while running and writes to disk when stopped. So it won’t see the data from sync until after it is stopped anyway.

  2. I don’t believe there are any wallets out yet. Ours will be ready soon and I am sure others will follow.

  3. That option isn’t available currently. It is possible though. You could just comment out the code in CLI that signs the tx, and save the outputs related to the inputs. Then bitcoin software can later complete the signature.