diff --git a/keywords.txt b/keywords.txt index 072e7d9..fd0a619 100644 --- a/keywords.txt +++ b/keywords.txt @@ -53,3 +53,4 @@ IOTEX_SIGNATURE_C_STRING_SIZE LITERAL1 IOTEX_CONTRACT_ENCODED_FUNCTIONSELECTOR_SIZE LITERAL1 IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE LITERAL1 IOTEX_CONTRACT_ENCODED_TRANSFER_SIZE LITERAL1 +IOTEX_CONTRACT_ENCODED_BALANCEOF_SIZE LITERAL1 diff --git a/src/contract/xrc20Contract.h b/src/contract/xrc20Contract.h index 148d703..8f17e22 100644 --- a/src/contract/xrc20Contract.h +++ b/src/contract/xrc20Contract.h @@ -5,7 +5,8 @@ #include "IoTeXConstants.h" #define IOTEX_CONTRACT_ENCODED_FUNCTIONSELECTOR_SIZE 4 -#define IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE 36 +#define IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE 4 +#define IOTEX_CONTRACT_ENCODED_BALANCEOF_SIZE 36 #define IOTEX_CONTRACT_ENCODED_TRANSFER_SIZE 68 namespace iotex @@ -19,7 +20,8 @@ class Xrc20Contract * * @param[out] data The buffer where the data is stored */ - static void generateCallDataForTotalSupply(uint8_t data[4]); + static void + generateCallDataForTotalSupply(uint8_t data[IOTEX_CONTRACT_ENCODED_TOTALSUPPLY_SIZE]); /** * @brief Generates the Ethereum ABI encoded data for calling the balanceOf() function of a