stellar / stellar-cli

CLI for Stellar developers
Apache License 2.0
74 stars 71 forks source link

CLI: inconsistencies in silent auto-restoring of expired entries #1023

Open c0linw opened 1 year ago

c0linw commented 1 year ago

The CLI will silently restore contract entries when using soroban contract invoke, but not when using soroban contract bump. This could confuse developers when they are able to call a contract that cannot be found, or make it unclear that the contract actually needs to be bumped. It may be helpful to keep the behaviour consistent across CLI operations either by adding the silent restore to all relevant operations, or by removing it.

image

stellarsaur commented 1 year ago

Is there an equivalent to soroban contract bump now that it's removed (according to latest changes on main)? Looks like soroban contract invoke is still silently restoring contract entries, unless I'm mistaken.

leighmcculloch commented 1 year ago

Bump was renamed to extend in:

CollinsC1O commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello I'm a frontend and also a blockchain developer and I would love to work on this issue.

gregemax commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have extensive experience working with CLI tools in JavaScript, TypeScript, Go, and Rust, including contributing to open-source projects. My background in designing consistent user experiences in CLI tools, particularly in ensuring predictable and clear behavior for developers, will be valuable in addressing this issue.

How I plan on tackling this issue

I would first analyze the root cause of the silent auto-restoring behavior by examining both soroban contract invoke and soroban contract bump commands. My approach would focus on ensuring consistency across these operations. To achieve this, I would:

Determine whether to standardize the silent restore behavior for all CLI operations or remove it entirely. Update the documentation to clearly outline the behavior for each command. Implement tests to validate consistent behavior across both scenarios, ensuring developers have a clear understanding of when and why a contract is restored or needs to be bumped.

gregemax commented 1 month ago

Thank you I will start right away