Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
850753a7
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
850753a7
编写于
5月 09, 2018
作者:
D
Daniel Larimer
提交者:
GitHub
5月 09, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'slim' into system-contract-tests-fix
上级
9e7fb927
ac9caf3f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
127 deletion
+0
-127
contracts/eosiolib/account.h
contracts/eosiolib/account.h
+0
-46
contracts/eosiolib/account.hpp
contracts/eosiolib/account.hpp
+0
-81
未找到文件。
contracts/eosiolib/account.h
已删除
100644 → 0
浏览文件 @
9e7fb927
/**
* @file account.h
* @copyright defined in eos/LICENSE.txt
*/
#pragma once
#include <eosiolib/types.h>
/**
* @defgroup accountapi Account API
* @brief Define API for querying account data
* @ingroup contractdev
*/
/**
* @defgroup accountcapi Account C API
* @brief C API for querying account data
* @ingroup accountapi
* @{
*/
extern
"C"
{
/**
* @brief Retrieve the balance for the provided account
* @details Retrieve the balance for the provided account
*
* @param balance - a pointer to a range of memory to store balance data
* @param len - length of the range of memory to store balance data
* @return true if account information is retrieved
*
* @pre data is a valid pointer to a range of memory at least datalen bytes long
* @pre data is a pointer to a balance object
* @pre *((uint64_t*)data) stores the primary key
*
* Example:
* @code
* balance b;
* b.account = N(myaccount);
* balance(b, sizeof(balance));
* @endcode
*
*/
bool
account_balance_get
(
void
*
balance
,
uint32_t
len
);
///@ } accountcapi
}
contracts/eosiolib/account.hpp
已删除
100644 → 0
浏览文件 @
9e7fb927
/**
* @file account.hpp
* @copyright defined in eos/LICENSE.txt
* @brief Defines types and ABI for account API interactions
*
*/
#pragma once
#include <eosiolib/account.h>
#include <eosiolib/print.hpp>
#include <eosiolib/asset.hpp>
namespace
eosio
{
namespace
account
{
/**
* @defgroup accountcppapi Account C++ API
* @brief C++ API for querying account data, e.g. account balance
* @ingroup accountapi
*
* @{
*/
/**
* @brief The binary structure expected and populated by native balance function.
* @details
* Example:
* @code
* account_balance test1_balance;
* test1_balance.account = N(test1);
* if (account_api::get(test1_balance))
* {
* eosio::print("test1 balance=", test1_balance.eos_balance, "\n");
* }
* @endcode
* @{
*/
struct
PACKED
(
account_balance
)
{
/**
* @brief Name of the account who's balance this is
* @details Name of the account who's balance this is
*/
account_name
account
;
/**
* @brief Balance for this account
* @details Balance for this account
*/
asset
eos_balance
;
/**
* @brief Staked balance for this account
* @details Staked balance for this account
*/
asset
staked_balance
;
/**
* @brief Unstaking balance for this account
* @details Unstaking balance for this account
*/
asset
unstaking_balance
;
/**
* @brief Time at which last unstaking occurred for this account
* @details Time at which last unstaking occurred for this account
*/
time
last_unstaking_time
;
};
/// @} account_balance
/**
* @brief Retrieve a populated balance structure
* @details Retrieve a populated balance structure
* @param acnt - account
* @return true if account's balance is found
*/
bool
get
(
account_balance
&
acnt
)
{
return
account_balance_get
(
&
acnt
,
sizeof
(
account_balance
));
}
/// @} eosio
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录