1#ifndef IOTEX_XRC20_CONTRACT_H
2#define IOTEX_XRC20_CONTRACT_H
4#include "contract/contract.h"
5#include "IoTeXConstants.h"
7#define IOTEX_CONTRACT_ENCODED_FUNCTIONSELECTOR_SIZE 4
8#define IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE 4
9#define IOTEX_CONTRACT_ENCODED_BALANCEOF_SIZE 36
10#define IOTEX_CONTRACT_ENCODED_TRANSFER_SIZE 68
34 uint8_t data[IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE]);
45 uint8_t data[IOTEX_CONTRACT_ENCODED_TRANSFER_SIZE]);
Definition: xrc20Contract.h:15
static void generateCallDataForTransfer(const uint8_t to[ETH_ADDRESS_SIZE], uint64_t value, uint8_t data[IOTEX_CONTRACT_ENCODED_TRANSFER_SIZE])
Generates the Ethereum ABI encoded data for calling the transfer() function of a XRC20 token.
Definition: xrc20Contract.cpp:22
static void generateCallDataForBalanceOf(const uint8_t address[ETH_ADDRESS_SIZE], uint8_t data[IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE])
Generates the Ethereum ABI encoded data for calling the balanceOf() function of a XRC20 token.
Definition: xrc20Contract.cpp:12
static void generateCallDataForTotalSupply(uint8_t data[IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE])
Generates the Ethereum ABI encoded data for calling the totalSupply() function of a XRC20 token.
Definition: xrc20Contract.cpp:6