NCOG Earth Chain Documentation

Developer Guide

Estimated reading: 2 minutes 33 views

Developers building on NCOG Earth Chain have a rich platform to work with. This section provides a high-level guide on how to integrate and utilize NCOG’s capabilities, including writing smart contracts and database procedures, submitting transactions, and using the available APIs and tools. 

Smart Contracts and Programming Model: NCOG Earth Chain supports Turing-complete smart contracts. It likely provides a virtual machine (VM) or leverages an existing one (for example, an Ethereum-compatible EVM or a WebAssembly VM). Developers can write contracts in a supported language (such as Solidity, if EVM-compatible, or a specialized language for NCOG). The contracts can hold assets, implement logic, and call other contracts similar to other blockchains. In addition: 

  • Database Contracts: As mentioned, developers can deploy contracts that define a database schema and stored procedures. This is a new paradigm: one might define tables and associated logic as part of a contract. The contract addresses tie into the DDB – for instance, a contract might have a method that internally calls a stored procedure, triggering the DDB consensus flow. 

Interoperability between VM and DDB: A smart contract can call a stored procedure by emitting a special transaction or through a system call if supported. Conversely, a stored procedure, during execution, might invoke a smart contract call or check on-chain state (this would be more complex and might be restricted to avoid circular dependencies – more likely, the stored procedures handle most logic needed, and any asset transfers can be done via provided system functions). 

Share this Doc

Developer Guide

Or copy link

CONTENTS