Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
84b223d1
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,发现更多精彩内容 >>
提交
84b223d1
编写于
9月 14, 2017
作者:
A
Andrianto Lie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix eos contract content doesn’t appear
上级
4b40a92b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
35 addition
and
34 deletion
+35
-34
contracts/eos/eos.cpp
contracts/eos/eos.cpp
+35
-34
未找到文件。
contracts/eos/eos.cpp
浏览文件 @
84b223d1
/**
@defgroup eoscontract eos contract
@brief Documents the interface to the EOS currency contract
@ingroup contracts
@section eoscontractdesc Description
*/
namespace
native
{
namespace
native
{
/**
@defgroup eoscontract EOS Contract
@brief Documents the interface to the EOS currency contract
@ingroup contracts
@{
*/
/**
* @ingroup contracts
* @brief Defines the base class for all contracts
...
...
@@ -17,47 +17,47 @@ namespace native {
/**
* @brief updates the code that will be executed for this contract
*
* <h3> Required Authority </h3>
* <h3> Required Authority </h3>
*
* Requires authority of *this* contract.
*
* <h3> Required Scope </h3>
* <h3> Required Scope </h3>
*
* Requires scope of *this* contract.
*
* @note the change in code does not take effect until the start of the next block
*/
void
setcode
(
Bytes
code
,
Abi
abi
,
uint8_t
vm
=
0
,
Abi
abi
,
uint8_t
vm
=
0
,
uint8_t
vm_version
=
0
)
final
;
/**
* @brief updates the authority required for a named permission
*
* <h3> Required Authority </h3>
* <h3> Required Authority </h3>
*
* Requires authority of *this* contract.
*
* <h3> Required Scope </h3>
* <h3> Required Scope </h3>
*
* Requires scope of *this* contract.
*/
void
setauth
(
Name
permission
,
///< the name for the permission being set
Name
parent
,
///< the parent permission to this permission
Name
parent
,
///< the parent permission to this permission
Authority
auth
///< the set of keys/accounts and threshold );
)
final
;
/**
* @brief set the local named permission required for `this` account/contract to
* call `con::act(...)`
* call `con::act(...)`
*
* <h3> Required Authority </h3>
* <h3> Required Authority </h3>
*
* Requires authority of *this* contract.
*
* <h3> Required Scope </h3>
* <h3> Required Scope </h3>
*
* Requires scope of *this* contract.
*
...
...
@@ -69,46 +69,47 @@ namespace native {
*/
void
setperm
(
Name
con
,
Name
act
,
Name
myperm
);
};
/**
* @class eos
*
*
@brief A *native* currency contract implemented with account named `eos`
* @ingroup contracts
*
* The EOS contract is a *native* currency contract implemented with account named `eos`. This contract enables
* users to transfer EOS tokens to each other. This contract is designed to work the @ref stakedcontract and
*
@details
The EOS contract is a *native* currency contract implemented with account named `eos`. This contract enables
* users to transfer EOS tokens to each other. This contract is designed to work the @ref stakedcontract and
* @ref systemcontract when creating new accounts, claiming staked EOS.
*/
struct
eos
:
public
contract
{
/**
@brief This action will transfer funds from one account to another.
@pre `from`'s balance must be greaterthan or equal to `amount` transferred.
@pre The amount transferred must be greater than 0
@pre The amount transferred must be greater than 0
@pre `to` and `from` may not be the same account.
<h3> Required Authority </h3>
This action requires the authority of the `from` account.
<h3>Required Scope </h3>
This action requires access to `from` and `to` account scopes. It does not require
access to the `eos` scope which means that multiple transfers can execute in parallel
as long as they don't have any overlapping scopes.
<h3> Required Recipients </h3>
This message requires that the accounts `from` and `to` are listed in the required recipients. This ensures
other contracts are notified anytime EOS tokens are transferred.
*/
void
transfer
(
AccountName
from
,
///< account from which EOS will be withdrawn
AccountName
from
,
///< account from which EOS will be withdrawn
AccountName
to
,
///< account to receive EOS, may not be same as `from`
uint64_t
amount
///< must be greater than 0 and less or equal to `from`'s balance
uint64_t
amount
///< must be greater than 0 and less or equal to `from`'s balance
);
};
/// class EOS
/// @}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录