@Fangzheng1992
2018-10-12T08:57:14.000000Z
字数 5669
阅读 547
Specifically, users can issue managed tokens carring the freeze function, that is to say, the issuer can decide to freeze or unfreeze tokens of designated user address. The frozen address will be forbidden to transfer its assets until they are thawed by the issuer. Note that only the managed property issuer has permissions to freeze or thaw transaction, simultaneously, issuer cannot freeze himself.
1.Create managed properties that enable freeze:whc_sendissuancemanaged
2.Additional properties: whc_sendgrant
3.Transfer: whc_send
4.Freeze property: whc_sendfreeze
5.Unfreeze property: whc_sendunfreeze
RPC | feature |
---|---|
whc_createpayload_freeze | Creat a frozen transaction OP_RETURN payload |
whc_createpayload_unfreeze | Creat a unfrozen transaction OP_RETURN payload |
whc_sendfreeze | Creat and send a frozen transaction |
whc_sendunfreeze | Creat and send a unfrozen transaction |
whc_getfrozenbalance | Query the property freezen of specified address and token ID |
whc_getfrozenbalanceforid | Query the unfrozen address and property balance under the specified token ID |
whc_getfrozenbalanceforaddress | Query all unfrozen properties and balances of the specified address |
Description: Create transaction payload of wormhole frozen property
Call: wormholed-cli whc_createpayload_freeze "toaddress" propertyid "amount"
wormholed-cli whc_createpayload_freeze qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu 320 "100"
000000b90000014000000002540be400626368746573743a7171706a307975387739756b6737783468383378783761346e6a3866376d7373683564676e36666c667500
Description:Create transaction payload of wormhole unfrozing property
Call: wormholed-cli whc_createpayload_unfreeze "toaddress" propertyid "amount"
wormholed-cli whc_createpayload_unfreeze qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu 320 "100"
000000ba0000014000000002540be400626368746573743a7171706a307975387739756b6737783468383378783761346e6a3866376d7373683564676e36666c667500
Description:Create and send wormhole frozen property transaction
Call: wormholed-cli whc_sendfreeze "fromaddress" propertyid "amount"
"frozenaddress"
Caller: The property issuer
wormholed-cli whc_sendfreeze qpjua0mvqpnyxddavqys2j3d8wuewarmnvx3kqha2q 320 "100.0" qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu
45a9e5702c7d5c9836d77a5f571059a2b50fe32e39bf7bf0c0d7951392cb4e0b
Description:Create and send wormhole unfreeze property transaction
Call: wormholed-cli whc_sendunfreeze "fromaddress" propertyid "amount"
"frozenaddress"
Caller: The Property issuer
wormholed-cli whc_sendunfreeze qpjua0mvqpnyxddavqys2j3d8wuewarmnvx3kqha2q
320 "100.0" qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu
4d7e239fbc1a71ce7b27ae7b6bc4c557131973505f0d1701377d0302177390f9
Description:Query wormhole frozen property balance according address and property ID
Call: wormholed-cli whc_getfrozenbalance "frozenaddress" propertyid
wormholed-cli whc_getfrozenbalance qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu 320
{
"frozen": true,
"balance": "1900.00000000"
}
Description:Query wormhole frozen property balance according property ID
Call: wormholed-cli whc_getfrozenbalanceforid propertyid
wormholed-cli whc_getfrozenbalanceforid 320
[
{
"address": "bchtest:qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu",
"balance": "1900.00000000"
}
]
Description:Query wormhole frozen property balance according to property address
Call: wormholed-cli whc_getfrozenbalanceforaddress "address"
wormholed-cli whc_getfrozenbalanceforaddress qqpj0yu8w9ukg7x4h83xx7a4nj8f7mssh5dgn6flfu
[
{
"propertyid": 320,
"balance": "1900.00000000"
}
]
Description:Issue managed tokens
Call:wormholed-cli whc_sendissuancemanaged "fromaddress" ecosystem precision previousid "category" "subcategory" "name" "url" "data"
wormholed-cli whc_sendissuancemanaged qpjua0mvqpnyxddavqys2j3d8wuewarmnvx3kqha2q 1 8 1
"test freeze" "frozentoken" "www" "hello" ""
e32bff59d6088f2d6088ae90b31807cf4e50fde2f20bcdd3f1ca7b904b0fe2b6