An all-in-one solution
Loam powers full-stack smart contract authoring and interaction using a convention-over-configuration approach.
1. SDK
Create smart contracts using small, flexible building blocks called “subcontracts” with Loam SDK.
2. CLI
Command line interface built by the team that maintains the Stellar CLI. Create, build, deploy, and manage both contracts and frontend projects. Get started with cargo install loam-cli
.
3. Contract Lifetime Management
A package manager for publishing versioned Wasm binaries, a contract registry to deploy named contracts, and an expiration tracker to keep your data live.
4. Frontend
Opinionated, modern frontend toolchain with declarative environment configuration. From local dev and testing, to staging, to a production app—Loam has you covered.
Smart Contracts, Simplified
Composable
With Loam SDK, you compose your smart contract from many sub contracts. Subcontracts are like lego blocks that you can either use off-the-shelf from the open source ecosystem or that you can build yourself. A single Loam smart contract is composed of one or more subcontracts.
Upgradeable
The one subcontract that all Loam smart contracts must include (loam-subcontract-core
) adds an important method to the smart contract: redeploy
. You can call this method to switch the wasm hash—the behavior/brains of the contract—to a new one, while keeping the same contract ID. The storage accessed by each particular subcontract is loaded lazily, so upgrading one subcontract does not require migrating the data of another; each subcontract within your smart contract can be considered and upgraded independently.
Secure
The core subcontract also adds admin_set
and admin_get
to your contract, to make sure that only your trusted admin account can call redeploy
. Our full Loam architecture, beyond Loam SDK, also includes a universal factory contract, which makes it possible to deploy your contract and call admin_set
in a single transaction, helping avoid front-running.
Powerful CLI built in Rust
Get it
cargo install loam-cli
Start something
loam init my-loam-project
Build contracts
loam build
uses smart data structures to resolve all subcontract interdependencies and built them in the correct order.
Declarative environments
Describe your network, accounts, and contracts in environments.toml
, let loam dev
keep everything up-to-date as you edit your contracts.
Smart deploys (and updates, and maintenance, and…)
Universal Factory Contract
Have you deployed contracts? And initialized them? In one transaction? Not fun! Loam CLI paired with our stateless deployer contract makes it easy.
Wasm Package Manager
Hashes are cool, but you know what’s cooler? Names and versions. Version your own wasm binaries and/or rely on others’.
Contract Registry
Give your contracts names! And use others’ contracts by name. Our dream for the future? No more opaque contract IDs. Import contracts like you would any Rust crate.
Keep it live
Automatically extend the lifetime of all your contract data with Loam’s expiration tracker.
Contract-to-NPM Dependencies
Who’s Contract?
Your contract. Whether you wrote it or not. Contracts are public infrastructure. Use Loam and build frontends against any smart contract. With ease.
Env You Can Rely On
In development
, use local
network. In staging
, testnet
. In production
, pubnet
. Use environments.toml
to keep your team (and yourself) on-track.
Easy As
loam dev
watches your contracts—if you even need your own!—and your environments.toml
file for changes, then automatically generates new, fully-typed NPM packages for all contracts you rely on, every time something changes.
Convention Over Configuration
Don’t re-invent the wheel. Building decentralized apps is hard enough without needing to rediscover every design consideration yourself. Use our conventions as a starting point; tweak them later if you need to.