Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
8fa15865
Commit
8fa15865
authored
May 31, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
12e355fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
test-rpc.sh
plugin/dapp/trade/cmd/build/test-rpc.sh
+2
-2
No files found.
plugin/dapp/trade/cmd/build/test-rpc.sh
View file @
8fa15865
...
@@ -310,7 +310,7 @@ function trade_buyLimit() {
...
@@ -310,7 +310,7 @@ function trade_buyLimit() {
queryTransaction
".error | not"
"true"
queryTransaction
".error | not"
"true"
echo_rst
"trade buyLimit queryExecRes"
"
$?
"
echo_rst
"trade buyLimit queryExecRes"
"
$?
"
buyID
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.QueryTransaction","params":[{"hash":"'
"
${
txHash
}
"
'"}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
|
jq
-r
".result.receipt.logs[1].log.base.buyID"
|
awk
-F
'-'
'{print $4}'
)
buyID
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"Chain33.QueryTransaction","params":[{"hash":"'
"
${
txHash
}
"
'"}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
| jq
-r
".result.receipt.logs[1].log.base.buyID"
|
awk
-F
'-'
'{print $4}'
)
}
}
function
trade_sellMarket
()
{
function
trade_sellMarket
()
{
...
@@ -332,7 +332,7 @@ function trade_sellMarket() {
...
@@ -332,7 +332,7 @@ function trade_sellMarket() {
echo_rst
"trade sellMarket queryExecRes"
"
$?
"
echo_rst
"trade sellMarket queryExecRes"
"
$?
"
}
}
function
trade_revokeBuy
(){
function
trade_revokeBuy
()
{
res
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"trade.CreateRawTradeRevokeTx","params":[{"sellID":"'
"
${
sellID
}
"
'","fee": 1}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
| jq
-r
".error | not"
)
res
=
$(
curl
-s
--data-binary
'{"jsonrpc":"2.0","id":2,"method":"trade.CreateRawTradeRevokeTx","params":[{"sellID":"'
"
${
sellID
}
"
'","fee": 1}]}'
-H
'content-type:text/plain;'
${
MAIN_HTTP
}
| jq
-r
".error | not"
)
if
[
"
${
unsignedTx
}
"
==
""
]
;
then
if
[
"
${
unsignedTx
}
"
==
""
]
;
then
echo_rst
"trade revokeBuy create tx"
1
echo_rst
"trade revokeBuy create tx"
1
...
...
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