-
Notifications
You must be signed in to change notification settings - Fork 13
BaerChain cancelPendingOrder transaction
weidong edited this page Apr 8, 2020
·
4 revisions
1. Request json file Back Dir
- cancenlOrder.json file description
{
"source":[
{
"from":"0xc6f73c3b14456434c7db388bcb4fd47377c0d738",
"to":"0x00000000000000000000000000000000766f7465",
"value":"0x0",
"data":[
{
"type":4,
"cancelType":3,
"m_hash":"0xcc250214abf2dde79907983b860d0dfaa5e54b1a60ce640529eb34471243e2ea"
}
],
"chainId":"0x1",
"nonce":"0x3",
"gas":"0x13880",
"gasPrice":"0x5"
}
],
"keys":[
"8kZJMg3BfpkD6yzWh84N2ACPZaqWSZof1G23YQ7PD3u6"
]
}- You can view the code for json assembly
- params description
from :string, cancel order address
to :string, fixed address, cannot be changed
data : Cancellation data
> type : int, Fixed at 4, which means cancel orders
> cancelType : int, Fixed at 3, default
> m_hash : string, The hash value of the cancelled order, find the pending order through the hash value, then cancel the pending order
value : string, default: "0x0"
chainId : string, Chain ID, hexadecimal must be the same as chain creation chainId
nonce : string, Hexadecimal, nonce value, +1 after each execution
gas : string, Hexadecimal, the gas integer provided for transaction execution
gasPrice : string, Hexadecimal, for each gasPrice integer paid for gas
Remarks: When to fill in another address, and data is not empty, the default to is the contract address of the call, and transfer the value of the value from (from value if there is a value) to to, generally prohibit this operation
2. Description of the cancellation process Back Dir
- Confirm the hash that needs to be cancelled, such as: 0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238
- Execution instruction example
../cmdWallet -j ./cancenlOrder.json -s 127.0.0.1:36100- cmdWallet: Perform file acquisition
cd cpp-lsac/build : Enter the directory cmake .. : Execute instruction make : Execute instruction cd cpp-lsac/build/wallet/cmdWallet : You can find the cmdWallet executable file just compiled in this directory- Return result
{ "id": 1, "jsonrpc": "2.0", "result": "0x0c3e46070929a63b566387be31614dca5449e6136f864c98b5b3e933217f61d2" }