FundStar is a Soroban smart contract for creating and reading crowdfunding campaigns.
This repository includes helper scripts so users can run the project without manually typing long CLI commands.
- Rust + Cargo installed
- Stellar CLI installed (
stellar --version) - Wasm target installed:
rustup target add wasm32v1-none- A Stellar testnet identity (example name:
fundstar)
stellar keys generate fundstar
stellar keys fund fundstar --network testnetUsed for test/build/deploy.
./scripts/contract.sh test
./scripts/contract.sh build
./scripts/contract.sh deploy
./scripts/contract.sh allDefaults used by this script:
NETWORK=testnetSOURCE_ACCOUNT=fundstarALIAS=fundstar_contract
Override them per command if needed:
NETWORK=testnet SOURCE_ACCOUNT=fundstar ALIAS=fundstar_contract ./scripts/contract.sh allUsed to invoke contract functions.
It expects:
CONTRACT_ID(required)NETWORK(optional, defaulttestnet)SOURCE_ACCOUNT(optional, defaultfundstar)
The script auto-loads .env if present.
- Copy environment template:
cp .env.example .env- Open
.envand set your deployed contract id:
CONTRACT_ID=CXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
NETWORK=testnet
SOURCE_ACCOUNT=fundstar- Run full contract flow:
./scripts/contract.sh all- Invoke contract methods:
./scripts/invoke.sh get_campaign_count
./scripts/invoke.sh get_all_campaigns
./scripts/invoke.sh get_campaign --campaign_id 0Set a future deadline (30 days from now) and create a campaign:
DEADLINE=$(( $(date +%s) + 2592000 ))
./scripts/invoke.sh create_campaign \
--creator fundstar \
--name "FundStar Demo Campaign" \
--description "First campaign created via script" \
--goal 1000000 \
--deadline "$DEADLINE"Get number of campaigns:
./scripts/invoke.sh get_campaign_countGet one campaign by id:
./scripts/invoke.sh get_campaign --campaign_id 0Get all campaigns:
./scripts/invoke.sh get_all_campaigns- Confirm
.envexists in project root - Confirm
.envcontains a validCONTRACT_ID=C... - Ensure no trailing characters in the id
Check quickly:
cat .envMake sure deploy and invoke use the same network (testnet).
You likely deployed an old Wasm artifact. Re-run:
./scripts/contract.sh allThis project fulfills all requirements for the FundStar Level 2 bounty.
- 3 error cases handled:
CampaignNotFound,GoalNotReached, and token-level insufficient-balance failures surfaced through transaction simulation/submission. - Contract deployed on testnet: Live at
CDZIHKUBUJ3F6W6E2NRWP5JZXNBZP4O4PASBRQGW4FODFWK6I3PTDWE7. - Contract called from the frontend: Integrated using
stellar-sdkand signature-based transactions. - Transaction status visible: Real-time toast notifications for preparation, signing, submission, and finalization.
- Minimum 2+ meaningful commits: Multiple logical commits covering contract logic, frontend integration, and multi-wallet support.
- Multi-wallet support: Wallet selector includes both Freighter and Albedo, with Freighter wired as the primary signing flow.
- Real-time activity feed: Implemented
getCampaignEventsto stream contract events for live contribution updates.
- Contract ID:
CDZIHKUBUJ3F6W6E2NRWP5JZXNBZP4O4PASBRQGW4FODFWK6I3PTDWE7 - Reward Token (STAR):
CBERWLOGNDQGNCAJIF44D46HQ3PP5LAKO3FXIGZQJODRS3RCC7CZKTRD - Configured From:
frontend/.env - Network: Stellar Testnet
- Native XLM SAC:
CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC - RPC Endpoint:
https://soroban-testnet.stellar.org
Here are my screenshots for UI proofs, showcasing the completed features and on-chain integrations:
Show the modal with Freighter and Albedo options.

Capture the "Activity" tab on a campaign page showing real on-chain contributions.

Demonstrate the real-time feedback (Toasts) during the funding process.

Show the withdrawal controls visible only to the campaign owner once the goal is reached.

Proof of successful wallet connection (Freighter) and account authorization.

Verified results showing the Rust contract test suite passing in the local development environment.

- Zero-Lag Caching: In-memory caching for instantaneous navigation and zero-lag transition between pages.
- High-Fidelity Skeletons: Standardized skeleton loaders for a smooth, professional loading experience.
- Dynamic Activity Feed: Real-time updates for on-chain contributions using contract events.
- Smart Wallet Routing: Wallet chooser supports both Freighter and Albedo entry paths, with Freighter used for the main signed transaction flow.
- Creator Controls: Role-based access for campaign creators to withdraw funds once goals are reached.
FundStar has been upgraded to meet the high standards of the Level 3 (Orange Belt) graduation.
- Mini-dApp fully functional: Deployed and tested on Stellar Testnet.
- Minimum 3 tests passing: 15 comprehensive contract tests passing (see below).
- Loading states and progress indicators: Implemented high-fidelity Skeleton Loaders for all data grids and detail views.
- Basic caching implementation: Integrated a Zero-Lag Caching Layer in the frontend for instantaneous navigation.
- README complete: Documentation, test results, CI proof, and mobile screenshots included.
FundStar uses a robust testing suite in Rust to ensure the safety of all crowdfunding operations.
running 15 tests
test tests::test_create_campaign_current_time_deadline ... ok
test tests::test_create_campaign_invalid_goal_zero ... ok
test tests::test_get_campaign_count_empty ... ok
test tests::test_create_campaign_deadline_too_far ... ok
test tests::test_create_campaign_invalid_goal_negative ... ok
test tests::test_get_all_campaigns_empty ... ok
test tests::test_get_nonexistent_campaign ... ok
test tests::test_create_campaign_success ... ok
test tests::test_campaign_initial_state ... ok
test tests::test_get_all_campaigns_returns_all_in_order ... ok
test tests::test_multiple_campaigns_sequential_ids ... ok
test tests::test_fund_campaign_success ... ok
test tests::test_withdraw_fails_if_goal_not_reached ... ok
test tests::test_withdraw_funds_success ... ok
test tests::test_reward_minting_on_funding ... ok
test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12sFundStar has been upgraded with advanced inter-contract patterns and production-ready CI/CD infrastructure.
- Inter-contract call working: FundStar now mints STAR tokens via the Reward Token contract.
- Custom token deployed: The
STARLoyalty Token (SAC interface) is live. - CI/CD running: GitHub Actions pipeline active for automated testing and builds.
- Mobile responsive: UI fully optimized for mobile devices.
- Advanced event streaming: Real-time contribution tracking via on-chain event indexing.
- Main Contract:
CDZIHKUBUJ3F6W6E2NRWP5JZXNBZP4O4PASBRQGW4FODFWK6I3PTDWE7 - Reward Token (STAR):
CBERWLOGNDQGNCAJIF44D46HQ3PP5LAKO3FXIGZQJODRS3RCC7CZKTRD - Native XLM SAC:
CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC - Deployment Source of Truth:
frontend/.env - Reward Minting Proof: Verified by the
test_reward_minting_on_fundingcontract test and the frontend STAR balance integration.
These mobile screenshots demonstrate that FundStar remains usable across key flows on a narrow viewport:
Responsive hero layout, CTA stacking, and mobile-safe stats card.

Mobile-friendly form spacing and adaptive input layout for campaign creation.

Responsive wallet connection modal with touch-friendly actions.

Scrollable card layout and campaign browsing optimized for smaller screens.

Responsive campaign detail layout showing that the mobile experience also holds up in dark theme.

- Loyalty Reward System: Automated inter-contract minting of STAR tokens for every backer.
- Automated QA: Every push is verified by GitHub Actions (Rust tests + Next.js build).
- Production Persistence: Persistent session caching and optimized mobile layout.
- Commit scripts (
scripts/contract.sh,scripts/invoke.sh) - Do not commit
.envwith secrets - Keep private keys and seed phrases out of repository files