Prerequisites
Before deploying Vowena, ensure you have the following installed:
- Rust (latest stable) - rustup.rs
- wasm32 target -
rustup target add wasm32-unknown-unknown - Stellar CLI -
cargo install stellar-clior via Stellar docs - A funded Stellar account (mainnet XLM for fees, or testnet faucet for testing)
Build and Deploy
1
Clone the repository
2
Build the WASM binary
Compile the Soroban smart contract to WebAssembly:This produces the optimized WASM binary at
target/wasm32v1-none/release/vowena.wasm.3
Deploy to the network
- Mainnet
- Testnet
4
Initialize the contract
After deployment, initialize the contract with an admin address:
- Mainnet
- Testnet
The admin address is used only for TTL management (
extend_ttl). It cannot access funds, modify plans, or interfere with subscriptions. See Security for details.5
Verify the deployment
Confirm the contract is live by calling a read-only function:This should return an error like
- Mainnet
- Testnet
Plan not found - which confirms the contract is deployed and responding. No plans exist yet because none have been created.6
Create your first plan
Test the full flow by creating a plan:
- Mainnet
- Testnet
Testing
The Vowena contract includes a comprehensive test suite:Test coverage
Test coverage
The test suite includes 29 tests covering:
- Plan creation and validation
- Subscription lifecycle (create, cancel, expire)
- Billing flow (charge, trial periods, grace periods)
- Failed charge handling and pre-check logic
- Migration request, accept, and reject flows
- Refund processing
- TTL extension
- Edge cases (double charge, early charge, unauthorized access)
Running specific tests
Running specific tests
Contract Specifications
Environment Variables Reference
For convenience, set these in your shell when working with the contract:What’s Next
TypeScript SDK
Install the SDK and start building integrations.
Keeper Setup
Set up a keeper bot to automate billing.
API Reference
Complete reference for every contract function.
Architecture
Review the contract architecture and data models.