Quick Start
Prerequisites
Required Software
# Go 1.23.8+
go version
# Python 3.10+ with virtual environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Solidity compiler
# Brahma contracts use 0.8.22+, but 0.8.24 is compatible with all
solc-select install 0.8.24
solc-select use 0.8.24
# Foundry (for Solidity testing and deployment)
curl -L https://foundry.paradigm.xyz | bash
foundryupBuild & Test
Building the Blockchain
Local Testnet Setup
Important: Credential Initialization
Testnet setup requires explicit credential initialization for security.
Docker Setup (Alternative)
Credential Management
.envfile stores all account credentialsFile permissions automatically set to 600
Deterministic mode generates same test addresses
Production requires manual credential configuration
Run
make validate-envto verify configuration
Network Endpoints
Contract Development
Compiling Contracts
E2E Testing Scripts
Query Examples
AutoCLI Command Generation
Important: Manual query commands are disabled in x/brahma/module.go:112-117. The CLI uses AutoCLI to auto-generate commands from gRPC service definitions.
AutoCLI Naming Convention:
RPC method names are converted to kebab-case
Full method name is preserved (Query prefix is NOT dropped by AutoCLI)
Commands are generated directly from proto service definitions
Example:
QueryCoreGrantApplication→query-core-grant-application
Command Generation Examples:
AITensorByBlockHeight
aitensor-by-block-height
No "Query" prefix to drop
ContributionByWalletAddress
contribution-by-wallet-address
No "Query" prefix to drop
QueryCoreGrantApplication
query-core-grant-application
Full method name preserved
GetAllBlockHeightsByAIID
get-all-block-heights-by-aiid
No "Query" prefix to drop
QueryCore
query-core
Full method name preserved
QueryAITokens
query-aitokens
Full method name preserved
Params
params
Standard params query
QueryClaimableRewards
query-claimable-rewards
Full method name preserved
QueryClaimStatistics
query-claim-statistics
Full method name preserved
CLI Queries
The CLI uses AutoCLI to generate commands from gRPC service definitions:
REST API (Alternative to CLI)
REST endpoints follow the exact paths defined in proto files:
Discovering Available Commands
Note: The command names shown above are based on standard AutoCLI behavior in BitSDK (built on Cosmos SDK v0.53.3), where RPC method names are converted to kebab-case without dropping prefixes. If you find the actual commands differ, use evmd query brahma --help to see the exact generated command names for your version.
Transaction Examples
The Brahma module exposes one direct CLI transaction: Request for Core (rfc). This is used by platforms to submit AI tensor contributions on behalf of users with approved Core grant allocations.
How it works:
Platform creates a JSON file with transaction details (requester address, AI tensors, contributions)
Platform submits the transaction using
evmd tx brahma rfccommandThe module validates the allocation, calculates cores to mint, and updates balances
Users claim their minted cores through the platform's interface (which calls the smart contract's
claimCore()function)
Request for Core
Create a request.json file:
Important JSON field requirements:
Field names use PascalCase:
Requester,AITensors,Address,ContributionsAIfield must be base64-encoded bytes (e.g.,"ZG9uYWxkLWFp"= "donald-ai")To encode:
echo -n "donald-ai" | base64→ZG9uYWxkLWFpAddresscan be hex string (0x-prefixed Ethereum address)Contributionsis an array of uint64 values
Submit transaction:
Note: Core grant applications and removals are governance proposals, not direct CLI transactions.
Next Steps
Review Module API for detailed API reference
Explore Smart Contract Integration for contract development
Study Module Interaction to understand the architecture
Read Security Considerations before deploying to production
Last updated