Contract

Defines contract type which is base class for every EOSIO contract.

Classes

Type Name
class eosio::contract
Base class for EOSIO contract.

Variables

Functions

Variables Documentation

variable _self

name eosio::contract::_self;

The name of this contract

variable _code

name eosio::contract::_code;

The code name of the action this contract is processing.

variable _ds

datastream<const char*> eosio::contract::_ds;

The datastream for this contract

Functions Documentation

function contract

eosio::contract::contract(
    name receiver,
    name code,
    datastream< const char *> ds
)

Construct a new contract given the contract name

Parameters:

  • receiver - The name of this contract
  • code - The code name of the action this contract is processing.
  • ds - The datastream used

function get_self

name eosio::contract::get_self() const

Get this contract name

Returns:

name - The name of this contract

function get_code

name eosio::contract::get_code() const

The code name of the action this contract is processing.

Returns:

name - The code name of the action this contract is processing.

function get_datastream

datastream<const char*> eosio::contract::get_datastream() const

Get the datastream for this contract

Returns:

datastream<const char*> - The datastream for this contract