Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add is_view or similar "simulate-only" flag for deploy commands #1249

Open
Row-Bear opened this issue Mar 7, 2024 · 3 comments
Open

Add is_view or similar "simulate-only" flag for deploy commands #1249

Row-Bear opened this issue Mar 7, 2024 · 3 comments

Comments

@Row-Bear
Copy link
Contributor

Row-Bear commented Mar 7, 2024

What problem does your feature solve?

When user is about to deploy a contract to main-net, the (estimated) fee for the upload and install is unknown.

What would you like to see?

soroban contract deploy --wasm xx --network xx --is_view (or other named flag) to allow a simulation against the actual network
In the same way soroban contract invoke has the --is_view flag to only simulate a call.

What alternatives are there?

As far as I know, an approximate calculation could be made if the wasm size and network settings are know, but it's non-trivial.

@github-project-automation github-project-automation bot moved this to Backlog in DevX Mar 7, 2024
@leighmcculloch
Copy link
Member

+1 I think we should make the --is-view a command that is present on all commands that submit a tx.

Separate to this I think we should also rename --is-view to --simulate-only, because reading your suggestions above in the title, simulate only is much easier to understand. Is view assumes an EVM/Solidity background and understanding.

@janewang
Copy link
Contributor

janewang commented Apr 1, 2024

This ticket tracks separatingsimulate, sign, and send and provides simulate. I'd like to close this in favor of #1265

@leighmcculloch
Copy link
Member

leighmcculloch commented Apr 1, 2024

This ticket tracks separatingsimulate, sign, and send and provides simulate. I'd like to close this in favor of #1265

I think this makes sense as one way to go. To be clear the way that you would emulate this behaviour is with the following:

soroban contract deploy ... --build-only | soroban tx simulate

Although @willemneal was also exploring adding a --sim-only option alongside --build-only, which I think is also fine, and is basically what this issue is proposing. If others are okay with that, then we keep this issue, and mark the following pull request as resolving it:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog (Not Ready)
Development

No branches or pull requests

3 participants