Skip to content

Make --cost functional.#2257

Merged
fnando merged 5 commits into
mainfrom
fix-cost
Oct 15, 2025
Merged

Make --cost functional.#2257
fnando merged 5 commits into
mainfrom
fix-cost

Conversation

@fnando

@fnando fnando commented Oct 14, 2025

Copy link
Copy Markdown
Member

What

$ stellar contract extend --id hello --ledgers-to-extend 100000 --cost
ℹ️ Signing transaction: 1e6875d5e9c858215818466d50e98ed21adb3d82f97ca0846856954f2a50e7cd
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Fee Proposed: 46924                                                                                 │
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 100         │ Resource Fee: 46824                                                    │
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 100         │ Non-Refundable: 8106         │ Refundable: 38718                       │
│                            │                              │                                         │
│                            │ cpu instructions             │ return value                            │
│                            │ storage read/write           │ storage rent                            │
│                            │ tx size                      │ events                                  │
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                    👆 Proposed Fee  👇 Final Fee                                    │
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee Charged: 100 │ Non-Refundable Charged: 8106 │ Refundable Charged: 0 │ Refunded: 38718 │
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee Charged: 100 │ Resource Fee Charged: 8106                           │ Refunded: 38718 │
├─────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Fee Charged: 8206                                                                 │ Refunded: 38718 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
ℹ️ No changes detected, transaction was a no-op.
New ttl ledger: 146298

$ stellar contract invoke --cost --send=yes --id hello -- hello --to 'fnando'
ℹ️ Signing transaction: 812e0c833e2a4ccfda2be3c0720b297340c5859bb66e259b96d3c4026bb841d1
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Fee Proposed: 50906                                                                                    │
├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 100         │ Resource Fee: 50806                                                       │
├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 100         │ Non-Refundable: 11594         │ Refundable: 39212                         │
│                            │                               │                                           │
│                            │ cpu instructions              │ return value                              │
│                            │ storage read/write            │ storage rent                              │
│                            │ tx size                       │ events                                    │
├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│                                     👆 Proposed Fee  👇 Final Fee                                      │
├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee Charged: 100 │ Non-Refundable Charged: 11594 │ Refundable Charged: 430 │ Refunded: 38782 │
├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee Charged: 100 │ Resource Fee Charged: 12024                             │ Refunded: 38782 │
├────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Fee Charged: 12124                                                                   │ Refunded: 38782 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
["Hello","fnando"]

Why

Close #2255.

Known limitations

N/A

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Oct 14, 2025
@fnando fnando self-assigned this Oct 14, 2025
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Oct 14, 2025
@fnando fnando added bug Something isn't working cli Related to Soroban CLI labels Oct 14, 2025
Comment thread cmd/soroban-cli/src/fee.rs Outdated
@fnando
fnando enabled auto-merge (squash) October 15, 2025 23:23
@fnando
fnando merged commit 972feff into main Oct 15, 2025
31 checks passed
@fnando
fnando deleted the fix-cost branch October 15, 2025 23:33
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli Related to Soroban CLI

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

stellar contract invoke --cost is not working

2 participants