Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
7bc2046d
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,发现更多精彩内容 >>
提交
7bc2046d
编写于
4月 17, 2018
作者:
K
Khaled Al-Hassanieh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rebase on master, code cleaning
上级
8c4806e0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
29 addition
and
41 deletion
+29
-41
contracts/dice/dice.cpp
contracts/dice/dice.cpp
+0
-2
contracts/eosio.system/delegate_bandwidth.hpp
contracts/eosio.system/delegate_bandwidth.hpp
+5
-8
contracts/eosio.system/eosio.system.hpp
contracts/eosio.system/eosio.system.hpp
+2
-8
contracts/eosio.system/voting.hpp
contracts/eosio.system/voting.hpp
+5
-3
contracts/eosio.token/eosio.token.abi
contracts/eosio.token/eosio.token.abi
+0
-16
contracts/eosio.token/eosio.token.hpp
contracts/eosio.token/eosio.token.hpp
+14
-0
contracts/proxy/proxy.cpp
contracts/proxy/proxy.cpp
+2
-3
tests/wasm_tests/eosio.system_tests.cpp
tests/wasm_tests/eosio.system_tests.cpp
+1
-1
未找到文件。
contracts/dice/dice.cpp
浏览文件 @
7bc2046d
...
...
@@ -2,7 +2,6 @@
* @file
* @copyright defined in eos/LICENSE.txt
*/
#if 0
#include <utility>
#include <vector>
#include <string>
...
...
@@ -389,4 +388,3 @@ class dice : public eosio::contract {
};
EOSIO_ABI
(
dice
,
(
offerbet
)(
canceloffer
)(
reveal
)(
claimexpired
)(
deposit
)(
withdraw
)
)
#endif
contracts/eosio.system/delegate_bandwidth.hpp
浏览文件 @
7bc2046d
...
...
@@ -184,9 +184,8 @@ namespace eosiosystem {
//set_resource_limits( tot_itr->owner, tot_itr->storage_bytes, tot_itr->net_weight.quantity, tot_itr->cpu_weight.quantity );
eosio
::
action
act
(
eosio
::
permission_level
{
del
.
from
,
N
(
active
)},
N
(
eosio
.
token
),
N
(
transfer
),
std
::
make_tuple
(
del
.
from
,
N
(
eosio
),
total_stake
,
std
::
string
(
"stake bandwidth"
)
)
);
act
.
send
();
eosio
::
inline_transfer
(
eosio
::
permission_level
{
del
.
from
,
N
(
active
)},
N
(
eosio
.
token
),
{
del
.
from
,
N
(
eosio
),
total_stake
,
std
::
string
(
"stake bandwidth"
)
}
);
if
(
asset
(
0
)
<
del
.
stake_net_quantity
+
del
.
stake_cpu_quantity
)
{
voting
<
SystemAccount
>::
increase_voting_power
(
del
.
from
,
del
.
stake_net_quantity
+
del
.
stake_cpu_quantity
);
...
...
@@ -283,11 +282,9 @@ namespace eosiosystem {
// allow people to get their tokens earlier than the 3 day delay if the unstake happened immediately after many
// consecutive missed blocks.
{
eosio
::
action
act
(
eosio
::
permission_level
{
N
(
eosio
),
N
(
active
)},
N
(
eosio
.
token
),
N
(
transfer
),
std
::
make_tuple
(
N
(
eosio
),
req
->
owner
,
req
->
amount
,
std
::
string
(
"unstake"
)
)
);
act
.
send
();
}
eosio
::
inline_transfer
(
eosio
::
permission_level
{
N
(
eosio
),
N
(
active
)},
N
(
eosio
.
token
),
{
N
(
eosio
),
req
->
owner
,
req
->
amount
,
std
::
string
(
"unstake"
)
});
refunds_tbl
.
erase
(
req
);
}
};
...
...
contracts/eosio.system/eosio.system.hpp
浏览文件 @
7bc2046d
...
...
@@ -164,15 +164,11 @@ namespace eosiosystem {
p
.
per_block_payments
.
amount
=
0
;
});
{
eosio
::
action
act
(
eosio
::
permission_level
{
N
(
eosio
),
N
(
active
)},
N
(
eosio
.
token
),
N
(
transfer
),
std
::
make_tuple
(
N
(
eosio
),
cr
.
owner
,
rewards
,
std
::
string
(
"producer claiming rewards"
)
)
);
act
.
send
();
}
eosio
::
inline_transfer
(
eosio
::
permission_level
{
N
(
eosio
),
N
(
active
)},
N
(
eosio
.
token
),
{
N
(
eosio
),
cr
.
owner
,
rewards
,
std
::
string
(
"producer claiming rewards"
)
}
);
}
static
void
apply
(
account_name
receiver
,
account_name
code
,
action_name
act
)
{
// if ( !eosio::dispatch<currency, typename currency::transfer, typename currency::issue>( code, act ) ) {
if
(
!
eosio
::
dispatch
<
contract
,
typename
delegate_bandwidth
<
SystemAccount
>::
delegatebw
,
typename
delegate_bandwidth
<
SystemAccount
>::
refund
,
typename
voting
<
SystemAccount
>::
regproxy
,
...
...
@@ -199,8 +195,6 @@ namespace eosiosystem {
contract
().
on
(
receiver
,
eosio
::
unpack_action_data
<
undelegatebw
>
()
);
}
}
// }
}
/// apply
};
...
...
contracts/eosio.system/voting.hpp
浏览文件 @
7bc2046d
...
...
@@ -375,9 +375,11 @@ namespace eosiosystem {
auto
issue_quantity
=
parameters
.
blocks_per_cycle
*
(
parameters
.
payment_per_block
+
parameters
.
payment_to_eos_bucket
);
{
eosio
::
action
act
(
eosio
::
permission_level
{
N
(
eosio
),
N
(
active
)},
N
(
eosio
.
token
),
N
(
issue
),
std
::
make_tuple
(
N
(
eosio
),
issue_quantity
,
std
::
string
(
"producer pay"
)
)
);
act
.
send
();
// eosio::action act( eosio::permission_level{N(eosio),N(active)}, N(eosio.token), N(issue),
// std::make_tuple( N(eosio), issue_quantity, std::string("producer pay") ) );
// act.send();
eosio
::
inline_issue
(
eosio
::
permission_level
{
N
(
eosio
),
N
(
active
)},
N
(
eosio
.
token
),
{
N
(
eosio
),
issue_quantity
,
std
::
string
(
"producer pay"
)
});
}
set_blockchain_parameters
(
parameters
);
global_state_singleton
::
set
(
parameters
);
...
...
contracts/eosio.token/eosio.token.abi
浏览文件 @
7bc2046d
...
...
@@ -27,22 +27,6 @@
{"name":"quantity", "type":"asset"},
{"name":"memo", "type":"string"}
]
},{
"name": "inlineissue",
"base": "",
"fields": [
{"name":"quantity", "type":"asset"},
{"name":"memo", "type":"string"}
]
},{
"name": "inlinetransfer",
"base": "",
"fields": [
{"name":"from", "type":"account_name"},
{"name":"to", "type":"account_name"},
{"name":"quantity", "type":"asset"},
{"name":"memo", "type":"string"}
]
},{
"name": "account",
"base": "",
...
...
contracts/eosio.token/eosio.token.hpp
浏览文件 @
7bc2046d
...
...
@@ -75,4 +75,18 @@ namespace eosio {
account_name
ram_payer
);
};
typedef
std
::
tuple
<
account_name
,
account_name
,
asset
,
string
>
transfer_args
;
void
inline_transfer
(
permission_level
permissions
,
account_name
code
,
transfer_args
args
)
{
action
act
(
permissions
,
code
,
N
(
transfer
),
args
);
act
.
send
();
}
typedef
std
::
tuple
<
account_name
,
asset
,
string
>
issue_args
;
void
inline_issue
(
permission_level
permissions
,
account_name
code
,
issue_args
args
)
{
action
act
(
permissions
,
code
,
N
(
issue
),
args
);
act
.
send
();
}
}
/// namespace eosio
contracts/proxy/proxy.cpp
浏览文件 @
7bc2046d
#if 0
/**
* @file
* @copyright defined in eos/LICENSE.txt
...
...
@@ -8,6 +7,7 @@
#include <eosiolib/transaction.hpp>
#include <eosiolib/currency.hpp>
namespace
proxy
{
using
namespace
eosio
;
...
...
@@ -97,7 +97,7 @@ extern "C" {
if
(
action
==
N
(
onerror
))
{
apply_onerror
(
receiver
,
deferred_transaction
::
from_current_action
());
}
if
(
action
==
N
(
transfer
)
)
{
apply_transfer(receiver, code, unpack_action_data<eosiosystem::contract<N(eosio.system)>::currency::transfer_memo>());
//
apply_transfer(receiver, code, unpack_action_data<eosiosystem::contract<N(eosio.system)>::currency::transfer_memo>());
}
}
else
if
(
code
==
N
(
currency
)
)
{
if
(
action
==
N
(
transfer
)
)
{
...
...
@@ -110,4 +110,3 @@ extern "C" {
}
}
}
#endif
tests/wasm_tests/eosio.system_tests.cpp
浏览文件 @
7bc2046d
...
...
@@ -150,7 +150,7 @@ public:
// the balance is implied to be 0 if either the table or row does not exist
if
(
tbl
)
{
const
auto
*
obj
=
db
.
find
<
contracts
::
key_value_object
,
contracts
::
by_scope_primary
>
(
boost
::
make_tuple
(
tbl
->
id
,
symbol
(
SY
(
4
,
EOS
)).
value
()));
const
auto
*
obj
=
db
.
find
<
contracts
::
key_value_object
,
contracts
::
by_scope_primary
>
(
boost
::
make_tuple
(
tbl
->
id
,
symbol
(
SY
(
4
,
EOS
)).
value
()
>>
8
));
if
(
obj
)
{
//balance is the second field after symbol, so skip the symbol
fc
::
datastream
<
const
char
*>
ds
(
obj
->
value
.
data
(),
obj
->
value
.
size
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录