Skip to main content

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

ContractStandardLines
DALLA TokenPSP22~459
BeliNFTPSP34~649
PSP37 Multi-TokenPSP37~650
BelizeX FactoryAMM~350
BelizeX PairAMM (x·y=k)~832
BelizeX RouterAMM~652
Simple DAOGovernance~536
FaucetUtility~327
Access ControlLibrary~550
Hello BelizeChainExample~309

SDK Modules

ModulePurpose
GemSDKContracts, tokens, transfers
BelizeXSDKDEX swaps, liquidity, quotes
MeshNetworkSDKOff-grid mesh messaging
PrivacySDKPayroll with privacy
UtilitiesEncoding, formatting helpers

Environment

VariablePurpose
BLOCKCHAIN_WS_URLSubstrate WebSocket RPC

Related