Available Tools
Soroban Tools
Reference for the Soroban smart contract tools.
The Soroban tools shell out to the Stellar CLI.
Make sure stellar is installed and on your PATH.
soroban_build_and_optimize
Build and optimize a Soroban smart contract from source code.
Parameters
contractPath(string, optional) — path to the contract directory. Defaults to the current working directory.
Behavior
- Builds the contract with
stellar contract build - Finds all WASM files in the target release directory
- Optimizes each WASM file with
stellar contract optimize - Returns detailed logs of the entire process
soroban_deploy
Deploy a compiled Soroban contract to the network.
Parameters
wasmPath(string, required) — path to the compiled WASM filesecretKey(string, required) — secret key of the deploying accountconstructorArgs(array, optional) — arguments for the contract constructorname(string) — name of the constructor parametertype(string) — type of the argument (e.g.Address,String)value(string) — value of the argument
Behavior
- Detects whether the contract declares a constructor by scanning its source
- Fails early if a constructor is required but no arguments were provided
- Returns detailed deployment logs and the deployed contract address
soroban_retrieve_contract_methods
Retrieve the complete interface of a deployed Soroban contract.
Parameters
contractAddress(string, required) — address of the deployed contract (starts withC)
Returns — a structured ContractInterface object:
name— the contract namemethods— array of methods with parameters and return typesstructs— array of structs with their fieldsenums— array of enums with their variants (including error enums)
Behavior
- Supports all Soroban data types (primitives, structs, nested structs, enums)
- Automatically filters out the implicit
envparameter from method signatures