Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

getaddressasset support utxo #391

Merged
merged 5 commits into from
May 14, 2020

Conversation

baidang201
Copy link
Contributor

No description provided.

@baidang201
Copy link
Contributor Author

baidang201 commented Mar 25, 2020

create mst

./mvs-cli createasset --symbol DNA --volume 1000000000000 --description "testing asset of MVS" --issuer smith --decimalnumber 8 --rate 30 test11 passwd1

getaddressasset

curl -X POST -d '{
"id":25,
"jsonrpc":"2.0",
"method":"getaddressasset",
"params":[
"MF89nPU6ang8SxRvnra2VFaphooiGnqjjZ",
"--utxo"
]
}' http://127.0.0.1:8820/rpc/v3
{
"id" : 25,
"jsonrpc" : "2.0",
"result" : []
}

issue mst

./mvs-cli issue test11 passwd1 DNA

getaddressasset

curl -X POST -d '{
"id":25,
"jsonrpc":"2.0",
"method":"getaddressasset",
"params":[
"MF89nPU6ang8SxRvnra2VFaphooiGnqjjZ",
"--utxo"
]
}' http://127.0.0.1:8820/rpc/v3
{
"id" : 25,
"jsonrpc" : "2.0",
"result" :
[
{
"available" : 1000000000000,
"balance" : 1000000000000,
"frozen" : 0,
"symbol" : "DNA",
"utxo_block" : 10643,
"utxo_hash" : "d48e63402483254c68e28557fdd9760e8af58522abd278a86821f6130ee4aa25",
"utxo_index" : 0
}
]
}

getaddressasset

curl -X POST -d '{
"id":25,
"jsonrpc":"2.0",
"method":"getaddressasset",
"params":[
"MF89nPU6ang8SxRvnra2VFaphooiGnqjjZ",
"-r",
"0:999999999999",
"--utxo"
]
}' http://127.0.0.1:8820/rpc/v3

send 123 DNA to test22

./mvs-cli sendasset test11 passwd1 MJHwqLGu4viJbtkoGqvMTogkp5iL5HkAZ4 DNA 123

send 4 DNA to test22

./mvs-cli sendasset test11 passwd1 MJHwqLGu4viJbtkoGqvMTogkp5iL5HkAZ4 DNA 4

getaddressasset

curl -X POST -d '{
"id":25,
"jsonrpc":"2.0",
"method":"getaddressasset",
"params":[
"MJHwqLGu4viJbtkoGqvMTogkp5iL5HkAZ4",
"-r",
"0:999999999999",
"--utxo"
]
}' http://127.0.0.1:8820/rpc/v3

test symbol

getaddressasset
curl -X POST -d '{
"id":25,
"jsonrpc":"2.0",
"method":"getaddressasset",
"params":[
"MJHwqLGu4viJbtkoGqvMTogkp5iL5HkAZ4",
"-r",
"0:999999999999",
"-s", "DNX",
"--utxo"
]
}' http://127.0.0.1:8820/rpc/v3

test range

getaddressasset
curl -X POST -d '{
"id":25,
"jsonrpc":"2.0",
"method":"getaddressasset",
"params":[
"MJHwqLGu4viJbtkoGqvMTogkp5iL5HkAZ4",
"-r",
"0:3",
"-s", "DNA",
"--utxo"
]
}' http://127.0.0.1:8820/rpc/v3

create a checkattenuationverify utxo

./mvs-cli sendasset test11 passwd1 MJHwqLGu4viJbtkoGqvMTogkp5iL5HkAZ4 DNA 999999 -m "TYPE=2;LQ=9001;LP=301;UN=3;UC=100,100,101;UQ=3000,3000,3001"

getaddressasset

curl -X POST -d '{
"id":25,
"jsonrpc":"2.0",
"method":"getaddressasset",
"params":[
"MJHwqLGu4viJbtkoGqvMTogkp5iL5HkAZ4",
"-r",
"0:999999999999",
"-s", "DNA",
"--utxo"
]
}' http://127.0.0.1:8820/rpc/v3

{
"id" : 25,
"jsonrpc" : "2.0",
"result" :
[
{
"available" : 993998,
"balance" : 999999,
"frozen" : 6001,
"symbol" : "DNA",
"utxo_block" : 10994,
"utxo_hash" : "433bba3f5080138b1f84e08a2a696ededba81d03efd908a269de4d45dc8af61c",
"utxo_index" : 0
},
{
"available" : 123,
"balance" : 123,
"frozen" : 0,
"symbol" : "DNA",
"utxo_block" : 10761,
"utxo_hash" : "d02bfb1738cdcbd05491c56fd52188900d000f534307e88cc5e3c48524b3867e",
"utxo_index" : 0
},
{
"available" : 3,
"balance" : 3,
"frozen" : 0,
"symbol" : "DNA",
"utxo_block" : 10802,
"utxo_hash" : "29caea8b2ca1203ee95157c4c50e47828af845bd2fbee81c06c4f91d41c3de1a",
"utxo_index" : 2
}
]
}

@baidang201
Copy link
Contributor Author

1WechatIMG17
2WechatIMG18
3WechatIMG19

Copy link
Member

@betachen betachen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@betachen
Copy link
Member

ACK

@betachen betachen merged commit d08fd20 into mvs-org:master May 14, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants