You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stellar contract extend panics with "index out of bounds" when the extension is a no-op #2599
soroban-cli 26.1.0 (installed via Homebrew). The offending code is also present on main.
What did you do?
Ran stellar contract extend against a well-formed but non-existent contract ID. The transaction goes through as a no-op, then the CLI panics:
$ stellar contract extend --id CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4 --ledgers-to-extend 1
ℹ️ Simulating transaction…
ℹ️ Signing transaction: decde71f91ef2ce9d89a56fb2d9d4a2725b6034e6efc853a73e924d5d7130313
🌎 Sending transaction…
✅ Transaction submitted successfully!
🔗 https://stellar.expert/explorer/testnet/tx/decde71f91ef2ce9d89a56fb2d9d4a2725b6034e6efc853a73e924d5d7130313
ℹ️ No changes detected, transaction was a no-op.
thread 'main' (12110178) panicked at /Users/brew/Library/Caches/Homebrew/cargo_cache/registry/src/index.crates.io-1949cf8c6b5b557f/soroban-cli-26.1.0/src/commands/contract/extend.rs:288:42:
index out of bounds: the len is 0 but the index is 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
❌
The same crash occurs when attempting to extend any entry that doesn't exist.
What did you expect to see?
A clean error or message indicating the entry does not exist / nothing was extended, with a non-panic exit.
What did you see instead?
The CLI panicked with index out of bounds: the len is 0 but the index is 0 at src/commands/contract/extend.rs:288:42 and exited with a failure code.
Activity
Fix `contract restore` panic when restoring a missing entry (#2660)