Contracts in SORA
Contracts form the backbone of Soroban development, and SORA provides a powerful, intuitive interface to manage, deploy, and interact with your smart contracts on the Stellar network.
SHOWCASE CLIP
New to SORA? Check out our Contracts showcase clip to see how to manage, deploy, and interact with your smart contracts on the Stellar network!
Contracts Dashboard
The Contracts Dashboard is your central hub for managing all Stellar contracts across your projects in SORA.
Key features of the Contracts Dashboard include:
- Contract List: Displays all your contracts with their main contract name and associated project name.
- Search Bar: Allows you to quickly find specific contracts across all your projects.
- Contract Actions: A button for each contract to access detailed actions and information.
WARNING
The dashboard shows all lib
contracts across all projects registered in SORA. Always ensure you're working with the correct contract for your current project.
Using the Contracts Dashboard
- Searching for Contracts: Use the search bar to filter contracts by name or project.
- Accessing Contract Details: Click the "Contract Actions" button to view and interact with a specific contract.
Contract Actions
The Contract Actions page is your command center for interacting with and managing individual contracts. It provides a comprehensive set of tools to build, deploy, and interact with your Soroban smart contracts.
Key components of the Contract Actions page:
- Command Display: Shows the current Soroban CLI command being constructed based on your selections and inputs.
- Command Options: Interface to select and configure command options, including a command dropdown and option fields.
- View Output: Button to view the full command output in a modal.
- Command Generator: An AI-powered tool to help you create Soroban CLI commands.
- View All Contracts: Button to return to the main Contracts dashboard.
Command Output
After executing any contract action, SORA provides detailed output. The output is color-coded and structured to provide clear information about the execution results, including:
You can view this output directly in the SORA interface or copy it for further analysis.
AI-Powered Command Generator
SORA includes an AI-powered command generator to help you create Soroban CLI commands using natural language:
- Click the "Command Generator" button in the top right corner.
- Type your request in natural language.
- The AI will generate the appropriate Stellar CLI command.
- You can then execute this command directly or copy it for later use.
This feature is particularly helpful for users who are new to Soroban CLI or those who want to quickly test ideas without remembering exact command syntax.
Best Practices
- Version Control: Use git or another version control system to track changes to your contracts.
- Testing: Thoroughly test your contracts on testnets before deploying to mainnet.
- Security: Never share or expose your private keys. Use environment variables for sensitive information.
- Documentation: Keep clear documentation for your contract functions and their expected inputs/outputs.
- Regular Updates: Keep your SORA installation up to date for the latest features and security patches.
Behind the Scenes
When you use the Command Generator or execute actions in SORA, the application is constructing and executing Stellar CLI commands. For example:
- When you build a contract, SORA might run a command like
stellar contract build
. - Deploying a contract could translate to
stellar contract deploy
. - Invoking a function might use
stellar contract invoke
.
The AI-powered Command Generator uses natural language processing to interpret your requests and translate them into the appropriate Soroban CLI commands. This abstraction allows you to focus on development rather than remembering complex CLI syntax.