Quick Reference
Build the Contracts
git clone https://github.com/BelizeChain/gem.git
cd gem
cargo install cargo-contract --force
cargo contract build --release --manifest-path dalla_token/Cargo.toml
cargo contract build --release --manifest-path beli_nft/Cargo.toml
cargo contract build --release --manifest-path simple_dao/Cargo.toml
cargo contract build --release --manifest-path faucet/Cargo.toml
cargo contract build --release --manifest-path hello-belizechain/Cargo.toml
cargo test
SDK Usage
npm install @belizechain/gem-sdk
const { GemSDK } = require('@belizechain/gem-sdk');
const sdk = new GemSDK(process.env.BLOCKCHAIN_WS_URL || 'ws://localhost:9944');
await sdk.connect();
// PSP22 transfer
await sdk.dallaTransfer(tokenAddress, sender, recipient, amount);
// Query the chain
const header = await sdk.api.rpc.chain.getHeader();
Contract Inventory
| Contract | Standard | Lines |
|---|
| DALLA Token | PSP22 | ~459 |
| BeliNFT | PSP34 | ~649 |
| PSP37 Multi-Token | PSP37 | ~650 |
| BelizeX Factory | AMM | ~350 |
| BelizeX Pair | AMM (x·y=k) | ~832 |
| BelizeX Router | AMM | ~652 |
| Simple DAO | Governance | ~536 |
| Faucet | Utility | ~327 |
| Access Control | Library | ~550 |
| Hello BelizeChain | Example | ~309 |
SDK Modules
| Module | Purpose |
|---|
GemSDK | Contracts, tokens, transfers |
BelizeXSDK | DEX swaps, liquidity, quotes |
MeshNetworkSDK | Off-grid mesh messaging |
PrivacySDK | Payroll with privacy |
| Utilities | Encoding, formatting helpers |
Environment
| Variable | Purpose |
|---|
BLOCKCHAIN_WS_URL | Substrate WebSocket RPC |
Related