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

CLI: Separate sandbox command into a separate top-level command #165

Closed
leighmcculloch opened this issue Sep 29, 2022 · 1 comment
Closed

Comments

@leighmcculloch
Copy link
Member

leighmcculloch commented Sep 29, 2022

Looking at how the deploy command is shaping up, and how the two modes of operation are so different, I think we should separate sandbox logic into a sandbox sub-command.

This are the options for the deploy command being added in #152.

soroban-cli deploy

        --wasm <WASM>
            WASM file to deploy

        --id <CONTRACT_ID>
            Contract ID to deploy to (if using the sandbox)

        --ledger-file <LEDGER_FILE>
            File to persist ledger state (if using the sandbox) [default: .soroban/ledger.json]

        --rpc-server-url <RPC_SERVER_URL>
            RPC server endpoint

        --private-strkey <PRIVATE_STRKEY>
            Private key to sign the transaction sent to the rpc server

        --salt <SALT>
            Salt to use when creating contract sent to the rpc server

        --network-passphrase <NETWORK_PASSPHRASE>
            Network passphrase to sign the transaction sent to the rpc server

The goal would be to split that in half like:

soroban-cli sandbox deploy

        --wasm <WASM>
            WASM file to deploy

        --id <CONTRACT_ID>
            Contract ID to deploy to

        --ledger-file <LEDGER_FILE>
            File to persist ledger state [default: .soroban/ledger.json]
soroban-cli deploy

        --wasm <WASM>
            WASM file to deploy

        --rpc-server-url <RPC_SERVER_URL>
            RPC server endpoint

        --private-strkey <PRIVATE_STRKEY>
            Private key to sign the transaction sent to the rpc server

        --salt <SALT>
            Salt to use when creating contract sent to the rpc server

        --network-passphrase <NETWORK_PASSPHRASE>
            Network passphrase to sign the transaction sent to the rpc server

The flow of use would be like this:

To deploy to sandbox, or read from sandbox, etc:

soroban-cli sandbox deploy ...
soroban-cli sandbox read ...
soroban-cli sandbox invoke ...

To deploy to network, etc:

soroban-cli deploy ...

This design is evident in one other tools we've seen:

Other tools I looked at take different approaches:

Alternatives are:

  1. Keep things as they are, see how far we can get.
  2. Change the sandbox commands to identically mimic the real commands, but this comes at a cost of making the initial learning curve steeper when first experimenting with Soroban contracts.
  3. Possibly others, any ideas?

Thoughts @tomerweller @paulbellamy @sisuresh @2opremio @tsachiherman ?

@leighmcculloch
Copy link
Member Author

Exploring #173 as an alternative.

@leighmcculloch leighmcculloch removed their assignment Oct 5, 2022
@leighmcculloch leighmcculloch closed this as not planned Won't fix, can't repro, duplicate, stale Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant