lending-contract
No description available
Ask AI about lending-contract
Powered by Claude Β· Grounded in docs
I know everything about lending-contract. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Scaffold Stellar Frontend
To get started with Scaffold Stellar, visit its repo: github.com/AhaLabs/scaffold-stellar.
Under active development.
A modern, up-to-date toolkit for building Stellar smart contract frontends.
- β‘οΈ Vite + React + TypeScript
- π Auto-generated contract clients
- π§© Example components for contract interaction
- π Hot reload for contract changes
- π§ͺ Easy local/testnet deployment
This is the starter frontend generated by stellar scaffold init. See more at Scaffold Stellar.
Requirements
Before getting started, make sure youβve met the requirements listed in the Soroban documentation and that the following tools are installed :
- Rust
- Cargo (comes with Rust)
- Rust target: install the compilation target listed in the Soroban setup guide
- Node.js (v22, or higher)
- npm: Comes with the node installer or can also be installed package managers such as Homebrew, Chocolatey, apt, etc.
- Stellar CLI
- Scaffold Stellar CLI Plugin
Quick Start
To get started with a fresh Scaffold Stellar project, follow the steps below:
- Initialize a new project:
stellar scaffold init my-project
cd my-project
- Set up your development environment:
# Copy and configure environment variables
cp .env.example .env
# Install frontend dependencies
npm install
- Start development environment:
npm run dev
- For local development and deployment, start a local quickstart container with the Stellar CLI:
# starts a container running a Stellar node, RPC, API, and friendbot (faucet)
stellar container start
For testnet/mainnet deployment:
# First publish your contract to the registry
stellar registry publish
# Then deploy an instance with constructor parameters
stellar registry deploy \
--deployed-name my-contract \
--published-name my-contract \
-- \
--param1 value1
# Can access the help docs with --help
stellar registry deploy \
--deployed-name my-contract \
--published-name my-contract \
-- \
--help
# Install the deployed contract locally
stellar registry install my-contract
Scaffold Initial Project Structure
When you run stellar scaffold init, it creates a frontend-focused project structure with example contracts:
my-project/ # Your initialized project
βββ contracts/ # Example smart contracts
βββ packages/ # Auto-generated TypeScript clients
βββ src/ # Frontend React application
β βββ components/ # React components
β βββ contracts/ # Contract interaction helpers
β βββ debug/ # Debugging contract explorer
β βββ hooks/ # Custom React hooks
β βββ pages/ # App Pages
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
βββ target/ # Build artifacts and WASM files
βββ environments.toml # Environment configurations
βββ package.json # Frontend dependencies
βββ .env # Local environment variables
This template provides a ready-to-use frontend application with example smart contracts and their TypeScript clients. You can use these as reference while building your own contracts and UI. The frontend is set up with Vite, React, and includes basic components for interacting with the contracts.
