soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

contract read doesn't use default for durability like help said it does

Open leighmcculloch opened this issue 1 year ago • 2 comments
trafficstars

What version are you using?

38d86504

What did you do?

$ soroban contract read --help
...
      --durability <DURABILITY>
          Storage entry durability
          
          [default: persistent]

          Possible values:
          - persistent: Persistent
          - temporary:  Temporary
...
$ soroban contract read --id C... --key hello

What did you expect to see?

$ soroban contract read --id C... --key hello
hello,world,1643,2075242

What did you see instead?

$ soroban contract read --id C... --key hello
error: the following required arguments were not provided:
  --durability <DURABILITY>

$ soroban contract read --id C... --key hello --durability persistent
hello,world,1643,2075242

leighmcculloch avatar Mar 05 '24 21:03 leighmcculloch

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With over four years in blockchain and backend development, I’ve worked across different ecosystems, handling everything from smart contract design to on-chain interactions and protocol integration. I focus on building secure, scalable, and reliable blockchain applications, managing both on-chain and off-chain infrastructure.

How I plan on tackling this issue

I'd check the logic behind the soraban contract read call to identify what’s causing it to malfunction, then proceed with implementing a fix.

JoE11-y avatar Sep 26 '24 08:09 JoE11-y

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have experience working with JavaScript, TypeScript, and Go, including CLI tools and command handling. My background in debugging and improving developer tools will allow me to effectively identify and resolve the issue in this project

How I plan on tackling this issue

I would start by inspecting the command-line argument parsing within the project, specifically focusing on how default values for --durability are handled. After identifying the root cause of why the default isn't being applied, I would correct the behavior to ensure the CLI adheres to the documented defaults, followed by adding tests to prevent future regressions

gregemax avatar Sep 27 '24 05:09 gregemax

@gregemax Hi, I'm Emilie from OnlyDust, can you please reach out to me on telegram? @blumebee

Blumebee avatar Sep 30 '24 18:09 Blumebee