Menu

class eosio::contract

Class List > eosio :: contract

Base class for EOSIO contract. More...

Protected Attributes

Type Name
name _self
name _code
datastream< const char * > _ds
name _first_receiver

Public Functions

Type Name
contract (name receiver, name code, datastream< const char * > ds)
name get_self () const
name get_code () const
datastream< const char * > get_datastream () const
contract (name self, name first_receiver, datastream< const char * > ds)
name get_self () const
name get_code () const
name get_first_receiver () const
datastream< const char * > & get_datastream ()
const datastream< const char * > & get_datastream () const

Detailed Description

Base class for EOSIO contract. A new contract should derive from this class, so it can make use of EOSIO_ABI macro. Base class for EOSIO contract. Base class for EOSIO contract. A new contract should derive from this class, so it can make use of EOSIO_ABI macro.

Protected Attributes Documentation

variable _self

name eosio::contract::_self;

The name of this contract The name of the account this contract is deployed on.

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

variable _first_receiver

name eosio::contract::_first_receiver;

The account the incoming action was first received at.

Public 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

function contract (2/2)

eosio::contract::contract(
    name self,
    name first_receiver,
    datastream< const char * > ds
)

Construct a new contract given the contract name

Parameters:

  • self - The name of the account this contract is deployed on
  • first_receiver - The account the incoming action was first received at.
  • ds - The datastream used

function get_self (2/2)

name eosio::contract::get_self() const

Get this contract name

Returns:

name - The name of this contract

function get_code (2/2)

name eosio::contract::get_code() const

The first_receiver name of the action this contract is processing.

Returns:

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

function get_first_receiver

name eosio::contract::get_first_receiver() const

The account the incoming action was first received at.

Returns:

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

function get_datastream (2/3)

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

Get the datastream for this contract

Returns:

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

function get_datastream (3/3)

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

Get the datastream for this contract

Returns:

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


The documentation for this class was generated from the following file: libraries/eosiolib/contract.hpp