ok=$(jq '(.error|not) and (.result.receipt.tyName == "ExecOk") and (.result.height >= 0) and (.result.index >= 0) and (.result.amount >= 0)'<<<"$resp")
ok=$(jq '(.execer == "'$exec'") and ((.payload.transfer.to) == "'$to'")'<<<"$data")
["$ok"==true]
rst=$?
echo_rst "$FUNCNAME""$rst"
}
chain33_ReWriteRawTx(){
local fee=1000000
local exec="coins"
local to="1EDDghAtgBsamrNEtNmYdQzC1QEhLkr87t"
local tx1="0a05636f696e73122d18010a291080ade20422223145444467684174674273616d724e45744e6d5964517a43315145684c6b7238377420a08d0630f6db93c0e0d3f1ff5e3a223145444467684174674273616d724e45744e6d5964517a43315145684c6b72383774"
ok=$(jq '(.error|not) and (.result.txs[0].execer == "'$exec'") and (.result.txs[0].to == "'$to'") and (.result.txs[0].groupCount == '$groupCount') and (.result.txs[1].execer == "'$exec'") and (.result.txs[1].to == "'$to'") and (.result.txs[1].groupCount == '$groupCount')'<<<"$data")
["$ok"==true]
rst=$?
echo_rst "$FUNCNAME""$rst"
}
chain33_SignRawTx(){
local fee=1000000
local exec="coins"
local to="1EDDghAtgBsamrNEtNmYdQzC1QEhLkr87t"
local from="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
local privkey="CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944"
ok=$(jq '(.error|not) and (.result.txs[0].execer == "'$exec'") and (.result.txs[0].to == "'$to'") and (.result.txs[0].fee == '$fee') and (.result.txs[0].from == "'$from'")'<<<"$data")
["$ok"==true]
rst=$?
echo_rst "$FUNCNAME""$rst"
}
chain33_SendTransaction(){
local fee=1000000
local exec="coins"
local to="1EDDghAtgBsamrNEtNmYdQzC1QEhLkr87t"
local from="14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
local privkey="CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944"
ok=$(jq '(.error|not) and (.result != null)'<<<"$data")
["$ok"==true]
rst=$?
echo_rst "$FUNCNAME""$rst"
}
chain33_CreateNoBalanceTransaction(){
local to="1EDDghAtgBsamrNEtNmYdQzC1QEhLkr87t"
local txHex="0a05636f696e73122d18010a291080ade20422223145444467684174674273616d724e45744e6d5964517a43315145684c6b7238377420a08d0630a1938af2e88e97fb0d3a223145444467684174674273616d724e45744e6d5964517a43315145684c6b72383774"
ok=$(jq '(.error|not) and (.result.txs[0].execer == "none") and (.result.txs[0].groupCount == 2) and (.result.txs[1].execer == "coins") and (.result.txs[1].groupCount == 2) and (.result.txs[1].to == "'$to'")'<<<"$data")