A modular Soroban smart contract platform for token minting on the Stellar blockchain, with a TypeScript SDK for seamless integration.
Built for open-source collaboration via drips.network.
- SEP-41 Compliant Token β Full
TokenInterfaceimplementation (balance, transfer, approve, burn) - Admin-Controlled Minting β Only the contract admin can mint new tokens
- Pausable Lifecycle β Emergency pause/unpause to halt all operations
- Ownership Transfer β Securely hand over admin rights
- Total Supply Tracking β Accurate supply updated on every mint/burn
- TypeScript SDK β High-level client for all contract interactions
- Modular Architecture β Separate crates for admin, lifecycle, and token logic
bc-forge/
βββ contracts/ # Soroban smart contracts (Rust)
β βββ admin/ # Admin access control module
β β βββ Cargo.toml
β β βββ src/lib.rs
β βββ lifecycle/ # Pause/unpause lifecycle module
β β βββ Cargo.toml
β β βββ src/lib.rs
β βββ token/ # Core SEP-41 token contract
β βββ Cargo.toml
β βββ src/
β βββ lib.rs # Token contract implementation
β βββ events.rs # Structured event emissions
β βββ test.rs # Unit tests
βββ sdk/ # TypeScript SDK
β βββ src/
β β βββ index.ts # Entry point
β β βββ client.ts # bcForgeClient class
β β βββ utils.ts # Transaction helpers
β βββ package.json
β βββ tsconfig.json
βββ .github/
β βββ ISSUE_TEMPLATE/ # Bug, Feature, Contract Improvement
β βββ PULL_REQUEST_TEMPLATE.md
β βββ workflows/ci.yml # CI pipeline
βββ Cargo.toml # Workspace manifest
βββ CONTRIBUTING.md # Contributor guide (drips.network)
βββ LICENSE # MIT
βββ README.md # This file
| Tool | Version | Install |
|---|---|---|
| Rust | 1.74+ | rustup.rs |
| Wasm target | β | rustup target add wasm32-unknown-unknown |
| Stellar CLI | 22.0+ | cargo install stellar-cli --locked |
| Node.js | 18+ | nodejs.org |
git clone https://github.com/p3ris0n/bc-forge.git
cd bc-forge# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add the WebAssembly target
rustup target add wasm32-unknown-unknown
# Install Stellar CLI (includes Soroban)
cargo install stellar-cli --locked# Build all contracts (debug)
cargo build
# Build optimized WASM for deployment
cargo build --target wasm32-unknown-unknown --release
# Or use Stellar CLI
stellar contract buildcargo test --testsExpected output:
running 5 tests (admin) ... ok
running 5 tests (lifecycle) ... ok
running 16 tests (token) ... ok
cd sdk
npm install
npm run buildstellar keys generate --global deployer --network testnetstellar keys fund deployer --network testnetstellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/bc_forge_token.wasm \
--source deployer \
--network testnetSave the returned Contract ID (e.g., CABC...XYZ).
stellar contract invoke \
--id <CONTRACT_ID> \
--source deployer \
--network testnet \
-- \
initialize \
--admin <YOUR_PUBLIC_KEY> \
--decimal 7 \
--name "bc-forge Token" \
--symbol "SFG"stellar contract invoke \
--id <CONTRACT_ID> \
--source deployer \
--network testnet \
-- \
mint \
--to <RECIPIENT_ADDRESS> \
--amount 10000000000stellar contract invoke \
--id <CONTRACT_ID> \
--network testnet \
-- \
balance \
--id <ADDRESS>If you want to build and test against a local Soroban network, run the Stellar Quickstart container instead of using public testnet services.
docker run -d \
-p "8000:8000" \
--name stellar \
stellar/quickstart \
--localThis starts a local Stellar network with RPC, Horizon, and Friendbot on your machine.
Register the local network once, then switch the CLI to it:
stellar network add local \
--rpc-url http://localhost:8000/rpc \
--network-passphrase "Test SDF Network ; September 2015"
stellar network use localCreate a local identity and fund it from the local Friendbot instance:
stellar keys generate deployer
stellar keys fund deployerYou can use stellar keys public-key deployer to print the address, then use that keypair as the source account for contract deploy and invoke commands on the local network.
When using bcForgeClient, point rpcUrl at the local Quickstart instance:
import { bcForgeClient } from '@bc-forge/sdk';
const client = new bcForgeClient({
rpcUrl: 'http://localhost:8000',
networkPassphrase: 'Test SDF Network ; September 2015',
contractId: 'CABC...XYZ',
});If your local Quickstart setup exposes RPC on a different path, keep the same host and update the URL to match your container configuration.
import { bcForgeClient } from '@bc-forge/sdk';
import { Keypair } from '@stellar/stellar-sdk';
const client = new bcForgeClient({
rpcUrl: 'https://soroban-testnet.stellar.org',
networkPassphrase: 'Test SDF Network ; September 2015',
contractId: 'CABC...XYZ',
});
// Query balance
const balance = await client.getBalance('GABC...DEF');
console.log('Balance:', balance.toString());
// Mint tokens (admin only)
const admin = Keypair.fromSecret('SXXX...');
await client.mint('GABC...DEF', BigInt(1000_0000000), admin);
// Transfer tokens
const sender = Keypair.fromSecret('SYYY...');
await client.transfer(
sender.publicKey(),
'GXYZ...ABC',
BigInt(100_0000000),
sender
);See sdk/README.md for the full API reference.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β BcForgeToken β
β βββββββββββββ ββββββββββββββββ ββββββββββββββ
β β Admin β β Lifecycle β β SEP-41 ββ
β β Module β β Module β β Interface ββ
β β β β β β ββ
β β set_admin β β pause() β β balance() ββ
β β get_admin β β unpause() β β transfer()ββ
β β require_ β β is_paused() β β approve() ββ
β β admin() β β require_not_ β β burn() ββ
β β β β paused() β β mint() ββ
β βββββββββββββ ββββββββββββββββ ββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
We welcome contributions! bc-forge is maintained on drips.network β contributors can earn rewards by resolving posted issues.
- Browse open issues β Look for issues labeled
good-first-issue,smart-contract, orsdk - Fork & branch β Create a branch:
feature/<issue-number>-<short-description> - Implement & test β Write code, add/update tests, ensure
cargo testandnpm run buildpass - Submit a PR β Use the PR template; reference the issue number
See CONTRIBUTING.md for the full guide.
feature/<issue-number>-<description> # New features
fix/<issue-number>-<description> # Bug fixes
docs/<issue-number>-<description> # Documentation
test/<issue-number>-<description> # Test improvements
MIT β Free for personal and commercial use.