🚀
Tonomy Developer Docs
  • Introduction
    • Features
  • Build Web4 Apps
    • Install
    • Register your Web4 App
    • Login
    • User Data and Logout
    • Sign Verifiable Credentials
    • Server Authentication
    • Smart Contracts
      • Develop
      • Deploy
      • 1-Click Transactions
      • Wallet Signing
    • Send P2P Messages
    • Troubleshooting
  • Multi-Chain Transactions + Crypto
    • Wallet Connect
    • Antelope Sigining Request (ESR)
  • Run Tonomy Infrastructure
    • Overview
      • Configuration
      • What software to run?
    • Node Setup
      • Setup
      • Run an API Node
      • Run a Block Producer Node
      • Becoming a Block Producer on Tonomy
    • API Endpoints
    • Hardware Requirement
    • Troubleshooting
  • Connect as an Exchange
  • Run Tonomy Gov OS
    • Technical requirements
    • Deploy Tonomy ID
    • Deploy a web wallet with the SDK
    • Reference
      • Application Interface (API)
      • Software Development Kit (SDK)
    • Troubleshooting
Powered by GitBook
On this page
  1. Build Web4 Apps
  2. Smart Contracts

Develop

PreviousSmart ContractsNextDeploy

Last updated 1 month ago

Tonomy smart contracts are written in C++ using the CDT compiler toolkit.

Example (Basic Token Transfer):

<token.cpp>
#include <eosio/asset.hpp>
#include <eosio/print.hpp>

using namespace eosio;

class [[eosio::contract("mycontract")]] mycontract : public contract {
public:
    using contract::contract;

    [[eosio::action]]
    void transfer(const name& from, const name& to, const asset& quantity, const std::string& memo) {
        eosio::require_auth({from, get_self()});
        eosio::print("Transfer from ", from, " to ", to, " amount ", quantity);
    }
};

See the to finish writing your smart contract.

Antelope Smart Contract developer documentation