Smart Contracts
Overview
BalanceAI allows for smart contracts deployment. Developers can create and deploy smart contracts ink!, a Rust-based smart contract language for Substrate ecosystem.
However, the main utility of the BalanceAI chain is to provide AI marketplace, a set of dedicated smart contracts can be created. BalanceAI encourages to use smart contract to only build AI capable implementations. BalanceAI provides a set of templates for such contracts.
WebAssembly smart contracts
BalanceAI runtime is based on Substrate, and both networks incorporate pallet-contracts
, a sandboxed environment used to deploy and execute WebAssembly smart contracts. Any language that compiles to Wasm may be deployed and run on this Wasm Virtual Machine, however, the code should be compatible with the pallet-contracts
API.
To avoid unnecessary complexity, and writing boilerplate code, the most appropriate method of building will involve the use of an eDSL specifically targeting pallet-contracts
, such as [ink!] (based on Rust), or [ask!] (based on AssemblyScript), or possibly others as the ecosystem grows.
After compilation, a Wasm blob can then be deployed and stored on-chain.
Learn more
More about AI capable smart contracts coming soon.