Skip to content

Fix initialize.sh — missing max_supply argument in learn-token init #173

Description

@DeFiVC

What

The initialize.sh deployment script is missing the required --max_supply argument when initializing the learn-token contract, which will cause deployment to fail.

Why

The learn-token contract's initialize() function requires 6 arguments: admin, name, symbol, decimal, progress_tracker, and max_supply. The script only passes 5 — max_supply is omitted. Any deployment to testnet or mainnet will panic.

Scope

  • Add the --max_supply argument to the learn-token initialization call in initialize.sh
  • Prompt the operator for the value or use a reasonable default
  • Ensure the value is passed in the correct format

Technical Context

  • File: scripts/initialize.sh (lines ~149-162)
  • The soroban contract invoke call for learn-token needs the missing argument
  • Other contract initializations in the same script are correct

Acceptance Criteria

  • initialize.sh passes --max_supply to the learn-token init call
  • The script completes without error on a testnet deployment
  • The value is configurable (e.g., via environment variable or prompt)

Metadata

Metadata

Assignees

No one assigned

    Labels

    criticalSecurity vulnerability, data loss, broken core flow, production crash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions