Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢昇
test
Commits
56d58526
Commit
56d58526
authored
Jul 16, 2019
by
谢昇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update cli独立模块命令.md
parent
718cf777
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
6 deletions
+35
-6
cli独立模块命令.md
cli独立模块命令.md
+35
-6
No files found.
cli独立模块命令.md
View file @
56d58526
**版本:
V6.2.0**
**版本:
V6.2.0**
...
@@ -15,12 +15,41 @@ Available Commands:
...
@@ -15,12 +15,41 @@ Available Commands:
Hashlock正常流程,完整过程:
Hashlock正常流程,完整过程:
1.
需要准备两个账户A和B,其中A是returnAddr,用于在锁定时间结束后,可以返回余额,B是toAddr,在锁定时间内,能够进行操作转移金额
1.
需要准备两个账户A和B,其中:
我这里A:14KEKbYtKKQm4wMthSK9J4La4nAiidGozt B:1KoVEeACNMyr42uEnfKR7SJTi5wE8nGWqx
A是returnAddr,用于在锁定时间结束后,可以返回余额;
B是toAddr,在锁定时间内,能够进行操作转移金额。
这里
A:1KVtEMhwaJqVE4nQEhdfxNkMPXFhRtEZd3
B:1LgiDySWZBGGcR4njtsXbWpJ6AS2R9cdwW
B地址需要小额BTY作为手续费
2.
hashlock要求在lock动作时,合约里存在余额,这些余额在lock后会被frozen
`cli coins send_exec -a 500 -e hashlock`
由A签名并发送
查询A地址各合约余额
`cli account balance -a 1KVtEMhwaJqVE4nQEhdfxNkMPXFhRtEZd3`
```
{
"addr": "1KVtEMhwaJqVE4nQEhdfxNkMPXFhRtEZd3",
"execAccount": [
{
"execer": "coins",
"account": {
"balance": "499.9990",
"frozen": "0.0000"
}
},
{
"execer": "hashlock",
"account": {
"balance": "500.0000",
"frozen": "0.0000"
}
}
]
}
```
2.
hashlock要求在lock动作时,合约里存在余额,这些余额在lock后会被frozen
./cli bty send_exec -a 1000 -e hashlock
由A签名并发送
3.
lock操作
3.
lock操作
./cli hashlock lock -a 1000 -d 360 -r 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -t 1KoVEeACNMyr42uEnfKR7SJTi5wE8nGWqx -s mysecret
./cli hashlock lock -a 1000 -d 360 -r 14KEKbYtKKQm4wMthSK9J4La4nAiidGozt -t 1KoVEeACNMyr42uEnfKR7SJTi5wE8nGWqx -s mysecret
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment