-
Notifications
You must be signed in to change notification settings - Fork 114
Description
What problem does your feature solve?
--build-only should not require a source account. source account can be pass in as optional.
The stellar contract upload --build-only command currently requires a --source account to be specified, even though uploading a contract wasm doesn't involve any authorization. When using --build-only to just build the transaction (e.g., to later simulate it), there's no need for an actual account.
Use case: A developer wants to simulate uploading a contract to mainnet to estimate costs, but doesn't have an account configured. Since the upload operation requires no auth, they should be able to build and simulate the transaction without needing a real account.
Current workaround: On mainnet, you can work around this by specifying any existing account as the source:
stellar contract upload --wasm target/wasm32v1-none/release/test_empty.wasm --build-only --source GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF | stellar tx simulateThis works because the account just needs to exist for the simulation, but it's not intuitive and requires knowing about an arbitrary existing account.
What would you like to see?
When using --build-only, the --source option should either:
- Be optional, with the CLI using a placeholder/zero account automatically, or
- Accept a special value indicating "any account" or "simulation mode"
This would allow commands like:
stellar contract upload --wasm contract.wasm --build-only | stellar tx simulateWhat alternatives are there?
- Use any known existing account as
--source(current workaround shown above) - Configure a local identity even when you don't need one
Metadata
Metadata
Assignees
Labels
Type
Projects
Status