diff --git a/contracts/eoslib/account.h b/contracts/eoslib/account.h index 52fc4a1eca03ffd1e3270f08c754dd2ca59d6528..e9efe0e9454c68c7620747c334b9da489bdd98e6 100644 --- a/contracts/eoslib/account.h +++ b/contracts/eoslib/account.h @@ -27,7 +27,7 @@ extern "C" { * Example: * @code * balance b; - * b.account = n(myaccount); + * b.account = N(myaccount); * balance(b, sizeof(balance)); * @endcode */ diff --git a/contracts/eoslib/account.hpp b/contracts/eoslib/account.hpp index cd6d5d0b294605b8b787e3e6dfcf9adbf838b25f..982cc14fddd3cf22723bddc8f3ca2fdc188affb5 100644 --- a/contracts/eoslib/account.hpp +++ b/contracts/eoslib/account.hpp @@ -1,7 +1,7 @@ /** -* @file token.hpp +* @file account.hpp * @copyright defined in eos/LICENSE.txt -* @brief Defines types and ABI for standard token messages and database tables +* @brief Defines types and ABI for account API interactions * */ #pragma once @@ -11,8 +11,8 @@ namespace eosio { namespace account { /** - * @defgroup tokens Token API - * @brief Defines the ABI for interfacing with standard-compatible token messages and database tables. + * @defgroup account Account API + * @brief Defines the ABI for interfacing with account balances. * @ingroup contractdev * * @{ @@ -21,7 +21,7 @@ namespace eosio { namespace account { /** * @struct eosio::account_balance (must match account_balance defined in wasm_interface.cpp) * @brief The binary structure expected and populated by native balance function. -* @ingroup tokens +* @ingroup account * * @details * Example: @@ -38,31 +38,26 @@ namespace eosio { namespace account { struct PACKED (account_balance) { /** * Name of the account who's balance this is - * @brief Name of the account who's balance this is */ account_name account; /** * Balance for this account - * @brief Balance for this account */ asset eos_balance; /** * Staked balance for this account - * @brief Staked balance for this account */ asset staked_balance; /** * Unstaking balance for this account - * @brief Unstaking balance for this account */ asset unstaking_balance; /** * Time at which last unstaking occurred for this account - * @brief Time at which last unstaking occurred for this account */ time last_unstaking_time; }; diff --git a/contracts/test_api/test_account.cpp b/contracts/test_api/test_account.cpp index fc3827f7f76321a420e36e4ca56feebe1a865a83..9357c5477ee28646330a5b6fd4a3dcceabafa1a8 100644 --- a/contracts/test_api/test_account.cpp +++ b/contracts/test_api/test_account.cpp @@ -1,10 +1,15 @@ +/** + * @file + * @copyright defined in eos/LICENSE.txt + */ + #include #include #include #include "test_api.hpp" -/// eos with 8 digits of precision +/// must match #define in eos/types/asset.hpp #define EOS_SYMBOL (int64_t(4) | (uint64_t('E') << 8) | (uint64_t('O') << 16) | (uint64_t('S') << 24)) unsigned int test_account::test_balance_acc1() diff --git a/libraries/chain/wasm_interface.cpp b/libraries/chain/wasm_interface.cpp index 9271f485d27ea33676680b0cfc922e45069a4129..577f05ab5782cea478669fac6489a2e202340603 100644 --- a/libraries/chain/wasm_interface.cpp +++ b/libraries/chain/wasm_interface.cpp @@ -55,31 +55,26 @@ namespace eosio { namespace chain { { /** * Name of the account who's balance this is - * @brief Name of the account who's balance this is */ account_name account; /** * Balance for this account - * @brief Balance for this account */ asset eos_balance; /** * Staked balance for this account - * @brief Staked balance for this account */ asset staked_balance; /** * Unstaking balance for this account - * @brief Unstaking balance for this account */ asset unstaking_balance; /** * Time at which last unstaking occurred for this account - * @brief Time at which last unstaking occurred for this account */ time last_unstaking_time; }) diff --git a/libraries/types/include/eos/types/asset.hpp b/libraries/types/include/eos/types/asset.hpp index 053bf999e3aca40658b8fd88b16e222101d7b462..595dbb7ec9f9f7bca24593239431cdb3192c9a5e 100644 --- a/libraries/types/include/eos/types/asset.hpp +++ b/libraries/types/include/eos/types/asset.hpp @@ -6,7 +6,7 @@ #include #include -/// eos with 8 digits of precision +/// eos with 4 digits of precision #define EOS_SYMBOL (int64_t(4) | (uint64_t('E') << 8) | (uint64_t('O') << 16) | (uint64_t('S') << 24)) /// Defined to be largest power of 10 that fits in 53 bits of precision