Skip to content

Add deployment scripts and stellar.toml configuration for testnet and mainnet#47

Merged
prodbycorne merged 1 commit into
SmartDropLabs:mainfrom
Bug-Hunter-X:feat/deployment-scripts-and-stellar-toml
Jun 27, 2026
Merged

Add deployment scripts and stellar.toml configuration for testnet and mainnet#47
prodbycorne merged 1 commit into
SmartDropLabs:mainfrom
Bug-Hunter-X:feat/deployment-scripts-and-stellar-toml

Conversation

@Bug-Hunter-X

Copy link
Copy Markdown
Contributor

Overview

This PR adds deployment tooling so developers can build, test, and deploy SmartDrop Soroban contracts to Stellar testnet and mainnet without reconstructing the sequence from CLI docs. It introduces scripts/deploy.sh, network configuration in stellar.toml, Makefile targets, and a README Quick Start section.

Related Issue

Closes #26

Changes

🚀 Deployment Script

  • [ADD] scripts/deploy.sh
  • Installs farming-pool WASM via stellar contract install
  • Deploys the factory contract via stellar contract deploy
  • Calls factory.initialize(admin, pool_wasm_hash)
  • Saves deployed contract IDs to .contract-ids.json
  • Reads RPC URL and network passphrase from stellar.toml
  • Registers the selected network with the Stellar CLI automatically
  • Validates required inputs and fails fast with clear error messages
  • Retries on TxBadSeq sequence errors between transactions

🌐 Network Configuration

  • [ADD] stellar.toml
  • Added [testnet] RPC URL and network passphrase
  • Added [mainnet] RPC URL and network passphrase

🔧 Makefile

  • [ADD] Makefile
  • build — compile release WASM from soroban/
  • test — run contract unit tests
  • deploy-testnet — deploy to testnet via scripts/deploy.sh
  • deploy-mainnet — deploy to mainnet via scripts/deploy.sh

📚 Documentation

  • [MODIFY] README.md
  • Added Quick Start deployment section with prerequisites, build/test/deploy commands, and environment variable reference

🔒 Git Configuration

  • [MODIFY] .gitignore
  • Ignores generated .contract-ids.json

Verification Results

Acceptance Criteria Status
scripts/deploy.sh deploys and initializes factory end-to-end on testnet
Makefile with build, test, deploy-testnet, deploy-mainnet targets
.contract-ids.json generated and gitignored
stellar.toml with testnet + mainnet RPC configuration
README updated with Quick Start deployment section
Script fails fast with clear error messages on missing env vars
make test ✅ passed (50/50)
make deploy-testnet ✅ passed (factory deployed and initialized on testnet)
bash -n scripts/deploy.sh ✅ passed

Test plan

  • Run make test and confirm all contract tests pass
  • Run make deploy-testnet with a funded testnet identity
  • Confirm .contract-ids.json is written and gitignored
  • Invoke admin and pool_wasm_hash on the deployed factory to verify initialization
  • Confirm invalid NETWORK, missing identity, and missing WASM produce clear errors

…mainnet

Closes SmartDropLabs#26 by providing a repeatable deploy flow, Makefile targets, stellar.toml RPC config, and README quick-start docs so developers no longer need to reconstruct deployment steps manually.
@prodbycorne prodbycorne merged commit 12a5125 into SmartDropLabs:main Jun 27, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add deployment scripts and stellar.toml configuration for testnet and mainnet

2 participants