Skip to content

Staging example in environments.toml can't build (guess_the_number has no id) #277

Closed

Description

@Dgetsylver

Summary

The staging section of the template's environments.toml enables a client for guess_the_number but gives it no id (environments.toml#L78-L86):

[staging.contracts]
guess_the_number = { client = true, constructor_args = "--admin me", after_deploy = "reset" }

In staging and production the CLI never deploys anything. It only generates bindings for contracts that have an id, and fails otherwise (handle_production_contracts, cli clients.rs#L666-L682). So STELLAR_SCAFFOLD_ENV=staging stellar scaffold build --build-clients stops with:

⛔ ️An ID must be set for a contract in production or staging. E.g. <name>.id = C...

That error only comes after the account step has already generated testnet-user and funded it on testnet through friendbot.

constructor_args and after_deploy are also silently ignored outside development and testing. The line therefore suggests a capability that doesn't exist, and --admin me refers to a development-only identity.

Suggested fix

Comment the entry out, add an id placeholder, and explain how to get one:

# Deploy first (e.g. `stellar registry deploy …` or `stellar contract deploy …`), then paste the ID:
# guess_the_number = { client = true, id = "C..." }

Acceptance criteria

STELLAR_SCAFFOLD_ENV=staging stellar scaffold build --build-clients in a fresh project doesn't fail because of the template's own example entry.

Related: stellar-scaffold/cli#159


Found by reading the template (88bd964) and the CLI's handle_production_contracts (cli 0f385de); not run against testnet.

Activity

  1. zachfedor commented on Oct 5, 2026

    @zachfedor
    Contributor

    We're deprecating environments.toml in favor of scaffold.yml. See stellar-scaffold/cli#612

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions