Skip to content

Commit

Permalink
Merge pull request #98 from OrioGod/master
Browse files Browse the repository at this point in the history
update lock transfer and create
  • Loading branch information
xicilion authored Nov 1, 2018
2 parents e4441c1 + a7a3204 commit 34e9184
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docs/document/advanced/howtocreatetokeninfibos.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void token::excreate(
asset maximum_exchange, // 最大可兑换(流通)的通证数量
asset reserve_supply, // 未流通通证数量
asset reserve_connector_balance // 未流通通证保证金数量
time_point_sec expiration // 项目方预设的项目锁仓期(可以传时间戳和日期格式,时间戳单位为秒,时间需要大于等于当前时间)
)
```

Expand All @@ -40,7 +41,7 @@ void token::excreate(
...
let name = "fibostest123";
let ctx = fibos.contractSync("eosio.token");
let r = ctx.excreateSync(name, "100000000000.0000 ABC", 0, '0.0000 ABC','0.0000 ABC', '0.0000 FO', {
let r = ctx.excreateSync(name, "100000000000.0000 ABC", 0, '0.0000 ABC','0.0000 ABC', '0.0000 FO',0, {
authorization: name
});
console.log(r);
Expand Down Expand Up @@ -79,7 +80,7 @@ console.log(r);
...
let name = "fibostest123";
let ctx = fibos.contractSync("eosio.token");
let r = ctx.excreateSync(name, "100000000000.0000 AAA", 0.15,'10000000000.0000 AAA', '3000000000.0000 AAA', '90000.0000 FO', {
let r = ctx.excreateSync(name, "100000000000.0000 AAA", 0.15,'10000000000.0000 AAA', '3000000000.0000 AAA', '90000.0000 FO',1539830655, {
authorization: name
});
console.log(r);
Expand Down
9 changes: 5 additions & 4 deletions docs/document/advanced/howtouselock.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ void token::exlocktrans(
account_name from, //通证转出方
account_name to, //通证转入方
extended_asset quantity, //通证数量
time_point_sec expiration, //锁仓期
time_point_sec expiration, //待转出锁仓时间
time_point_sec expiration_to //待转入锁仓时间
string memo //附言
)
```
Expand All @@ -36,13 +37,13 @@ void token::exlocktrans(
//初始化 fibos 客户端
...
let ctx = fibos.contractSync("eosio.token");
let r = ctx.exlocktransSync("nmslwsndhjyz", "fibostest123", "10000.0000 ADC@nmslwsndhjyz", 1537960501, "lock transfer to fibostest123", {
let r = ctx.exlocktransSync("nmslwsndhjyz", "fibostest123", "10000.0000 ADC@nmslwsndhjyz", 1539830655,1539830948, "lock transfer to fibostest123", {
authorization: "nmslwsndhjyz"
})
console.notice(r);
```
上述代码中 `nmslwsndhjyz` 给用户 `fibostest123` 锁仓转账了 10000.0000 个 ADC 通证。并设置了解锁时间为 1537960501
上述代码中 `nmslwsndhjyz` 给用户 `fibostest123` 锁仓转账了 10000.0000 个 ADC 通证。并设置了解锁时间为 1539830948
## 解锁
Expand All @@ -67,7 +68,7 @@ void token::exunlock(
//初始化 fibos 客户端
...
let ctx = fibos.contractSync("eosio.token");
let r = ctx.exunlockSync("fibostest123", "100.0000 ADC@nmslwsndhjyz", 1537960501, "unlock 100.0000 ADC", {
let r = ctx.exunlockSync("fibostest123", "100.0000 ADC@nmslwsndhjyz", 1539830948, "unlock 100.0000 ADC", {
authorization: "hujzwsndnmsl"
})
console.notice(r);
Expand Down

0 comments on commit 34e9184

Please sign in to comment.