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
749115d7
Commit
749115d7
authored
Dec 27, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#627 update rpc_test
parent
97580b2f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
26 deletions
+26
-26
test-rpc.sh
plugin/dapp/issuance/cmd/test/test-rpc.sh
+26
-26
No files found.
plugin/dapp/issuance/cmd/test/test-rpc.sh
View file @
749115d7
...
...
@@ -36,7 +36,7 @@ issuance_Create() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
ISSU_ID
=
$RAW_TX_HASH
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -58,7 +58,7 @@ issuance_Manage() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
${
MAIN_HTTP
}
echo
"========== # issuance manage end =========="
...
...
@@ -74,7 +74,7 @@ issuance_Feed() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv2
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv2
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
data
=
$(
curl
-ksd
'{"method":"Chain33.Query","params":[{"execer":"issuance","funcName":"IssuancePrice","payload":{}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
...
...
@@ -93,7 +93,7 @@ issuance_Debt() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
DEBT_ID
=
$RAW_TX_HASH
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
...
...
@@ -117,7 +117,7 @@ issuance_Repay() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
data
=
$(
curl
-ksd
'{"method":"Chain33.Query","params":[{"execer":"issuance","funcName":"IssuanceRecordsByStatus","payload":{"issuanceId": "'
"
${
ISSU_ID
}
"
'", "status": 6}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
[
"
$data
"
!=
null
]
...
...
@@ -135,7 +135,7 @@ issuance_Close() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
data
=
$(
curl
-ksd
'{"method":"Chain33.Query","params":[{"execer":"issuance","funcName":"IssuanceByStatus","payload":{"status": 2}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
[
"
$data
"
!=
null
]
...
...
@@ -153,7 +153,7 @@ collateralize_Manage() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv1
}
"
${
MAIN_HTTP
}
ISSU_ID
=
$RAW_TX_HASH
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -173,7 +173,7 @@ collateralize_Create() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
COLL_ID
=
$RAW_TX_HASH
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -197,7 +197,7 @@ collateralize_Feed() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv2
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv2
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
"
${
MAIN_HTTP
}
"
data
=
$(
curl
-ksd
'{"method":"Chain33.Query","params":[{"execer":"collateralize","funcName":"CollateralizePrice","payload":{}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
...
...
@@ -216,7 +216,7 @@ collateralize_Borrow() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
CollateralizePriv
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
CollateralizePriv
}
"
${
MAIN_HTTP
}
BORROW_ID
=
$RAW_TX_HASH
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -240,7 +240,7 @@ collateralize_Append() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
CollateralizePriv
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
CollateralizePriv
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
${
MAIN_HTTP
}
echo
"========== # collateralize append end =========="
}
...
...
@@ -255,7 +255,7 @@ collateralize_Repay() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
CollateralizePriv
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
CollateralizePriv
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
${
MAIN_HTTP
}
data
=
$(
curl
-ksd
'{"method":"Chain33.Query","params":[{"execer":"collateralize","funcName":"CollateralizeRecordByStatus","payload":{"collateralizeId":"'
"
${
COLL_ID
}
"
'", "status":6}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
...
...
@@ -273,7 +273,7 @@ collateralize_Retrieve() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
"
${
IssuancePriv3
}
"
${
MAIN_HTTP
}
chain33_BlockWait 1
${
MAIN_HTTP
}
data
=
$(
curl
-ksd
'{"method":"Chain33.Query","params":[{"execer":"collateralize","funcName":"CollateralizeRecordByStatus","payload":{"collateralizeId":"'
"
${
COLL_ID
}
"
'", "status":6}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
...
...
@@ -371,7 +371,7 @@ manage() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
${
SystemManager
}
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
${
SystemManager
}
${
MAIN_HTTP
}
echo
"========== # issuance add issuance-manage end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -384,7 +384,7 @@ manage() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
$tx
"
${
SystemManager
}
${
MAIN_HTTP
}
chain33_Sign
AndSend
Tx
"
$tx
"
${
SystemManager
}
${
MAIN_HTTP
}
echo
"========== # issuance add issuance-price-feed end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -397,7 +397,7 @@ manage() {
# [ "$ok" == true ]
# echo_rst "$FUNCNAME" "$?"
#
# chain33_Sign
Raw
Tx "$tx" ${SystemManager} ${MAIN_HTTP}
# chain33_Sign
AndSend
Tx "$tx" ${SystemManager} ${MAIN_HTTP}
# echo "========== # issuance add issuance-guarantor end =========="
# chain33_BlockWait 1 ${MAIN_HTTP}
}
...
...
@@ -412,7 +412,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
echo
"========== # issuance add token token-blacklist end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -424,7 +424,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
echo
"========== # issuance add token token-finisher end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -436,7 +436,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
echo
"========== # issuance add token precreate end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -448,7 +448,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
echo
"========== # issuance add token finish end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -460,7 +460,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
tx
=
$(
curl
-ksd
'{"method":"Chain33.CreateTransaction","params":[{"execer": "token","actionName":"Transfer","payload": {"cointoken":"CCNY", "amount": "10000000000000", "note": "", "to": "'
"
${
IssuanceAddr3
}
"
'"}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
data
=
$(
curl
-ksd
'{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]}'
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
...
...
@@ -469,7 +469,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
tx
=
$(
curl
-ksd
'{"method":"Chain33.CreateTransaction","params":[{"execer": "token","actionName":"Transfer","payload": {"cointoken":"CCNY", "amount": "100000000000", "note": "", "to": "'
"
${
CollateralizeAddr
}
"
'"}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
data
=
$(
curl
-ksd
'{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]}'
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
...
...
@@ -478,7 +478,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
TokenSuperManager
}
"
"
${
MAIN_HTTP
}
"
echo
"========== # issuance add token transfer end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
...
...
@@ -490,7 +490,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
IssuancePriv1
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
IssuancePriv1
}
"
"
${
MAIN_HTTP
}
"
tx
=
$(
curl
-ksd
'{"method":"Chain33.CreateTransaction","params":[{"execer": "token","actionName":"Transfer","payload": {"cointoken":"CCNY", "amount": "10000000000000", "note": "", "to": "'
"
${
collateralize_addr
}
"
'"}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
data
=
$(
curl
-ksd
'{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]}'
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
...
...
@@ -499,7 +499,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
IssuancePriv3
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
IssuancePriv3
}
"
"
${
MAIN_HTTP
}
"
tx
=
$(
curl
-ksd
'{"method":"Chain33.CreateTransaction","params":[{"execer": "token","actionName":"Transfer","payload": {"cointoken":"CCNY", "amount": "100000000000", "note": "", "to": "'
"
${
collateralize_addr
}
"
'"}}]}'
${
MAIN_HTTP
}
| jq
-r
".result"
)
data
=
$(
curl
-ksd
'{"method":"Chain33.DecodeRawTransaction","params":[{"txHex":"'
"
$tx
"
'"}]}'
${
MAIN_HTTP
}
| jq
-r
".result.txs[0]"
)
...
...
@@ -508,7 +508,7 @@ token() {
[
"
$ok
"
==
true
]
echo_rst
"
$FUNCNAME
"
"
$?
"
chain33_Sign
Raw
Tx
"
${
tx
}
"
"
${
CollateralizePriv
}
"
"
${
MAIN_HTTP
}
"
chain33_Sign
AndSend
Tx
"
${
tx
}
"
"
${
CollateralizePriv
}
"
"
${
MAIN_HTTP
}
"
echo
"========== # issuance add token transfer to issuance end =========="
chain33_BlockWait 1
${
MAIN_HTTP
}
}
...
...
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