Improve way of seeing simulated costs of any tx

Open
#2,665 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
70/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
cli

Research direction

Start with the stellar tx simulate command and compare its behavior with the existing stellar contract invoke --cost option. Trace how simulated transactions are processed and how cost information is written to stderr. Done means users can request simulation fee or cost information for any transaction without decoding the transaction manually.

Written by the indexing model from the issue text.

Description

feature request
What problem does your feature solve?

It is not easy to see the simulated cost of some of the transactions that the CLI generates and submits.

For example, when uploading a contract, there's no easy way to identify what the cost is going to be:

$ stellar contract upload --wasm contract.wasm --build-only \
  | stellar tx simulate \
  | stellar tx decode \
  | jq '.tx.tx.fee'
1379621
What would you like to see?

An easier way to see the fees related to a tx simulation so that cost can be viewed for any operation before submitting.

The stellar contract invoke command has a --cost flag that when included causes cost information to be output to stderr. The same option could be added to stellar tx simulate.

Related

Discussed at https://discord.com/channels/897514728459468821/1533388251350568990/1533388251350568990

Dominant language
Rust
Stars
123
Forks
141
Avg merge
2d 21h
Merged PRs (30d)
17

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stellar/stellar-cli

All issues in stellar/stellar-cli

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.