Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[REQUEST] Allow additional ETP in and outputs in a MIT transfer #363

Open
canguruhh opened this issue Jan 10, 2020 · 3 comments
Open

[REQUEST] Allow additional ETP in and outputs in a MIT transfer #363

canguruhh opened this issue Jan 10, 2020 · 3 comments

Comments

@canguruhh
Copy link
Member

Currently a MIT transfer does not allow to send additional ETP. This would be required for a transaction in which someone wants to receive ETP in return of MITs.

Alice wants to sell a MIT. Bob wants to buy it and they already decided about a price of 10 ETP.

They manually create a transaction in which there is the MIT input from Alice and the ETP input from Bob (Must be >10 ETP). The outputs are the MIT to Bob, 10 ETP to Alice and the change output for Bob.

For this functionality we do not need a mvs-cli command. The transaction will be created externally but is required to be validated by the mvsd transaction validation.

@baidang201
Copy link
Contributor

baidang201 commented Feb 14, 2020

@baidang201
Copy link
Contributor

baidang201 commented Feb 17, 2020

For this functionality we do not need a mvs-cli command. The transaction will be created externally but is required to be validated by the mvsd transaction validation.

@canguruhh , can you created a raw transaction for testnet, and send raw transaction to me.
Or provide a test code/tool.

@baidang201
Copy link
Contributor

baidang201 commented Feb 21, 2020

it is work now in private net.
https://github.com/baidang201/metaverse/tree/363-Allow-additional-ETP-adv

here is a test rawtx
./mvs-cli decoderawtx 0400000002f6a2d808177092a942f410f093cfc4b64ac2de78486b94ebc13573ae266023c8000000006b483045022100aa41c6d1662f071891489e4ef350741bdbe4bb9907aba52b32b12cd851373f66022061981ec56b53f4b477c99eb2a359ad9e0bf3980d4311ec8c91049598a4e69d3c0121030bb96d9e325d9ed67aa6d5fe34818c00964843958087b4e2f4d9c45dc6ce1321ffffffff22a89b8b8324cca66c5046046dbba5e3f8be3f24f2a2cefaaa32ecfc7635baf5000000006b483045022100ded58f65789f839c19669293b28a216a2862ddad35e7aae69dc785d94103862402201db02c473f3f3fcadf7216eded34b719fa6bc593ab6c3e890c1f59f9dff96d7f01210392ead8c5478d717149fcaa05bcc26f0f94b06fdf26fea93fa316caf6920b6c9effffffff0301000000000000001976a914c5bd73cbdaf3bf5ab1a88659c5a7d6f2f2465afb88ac010000000000000002000000000000001976a91437b801aa8589cc9840332dfbf4652fca891e4dbe88ac010000000000000000000000000000001976a914c8acea9056ed0283cb80ced0f9baaaf5ff31e70a88ac01000000060000000203585858224d5343455845455a744c4e6453334a6a4644374a44666332514476553761736b584e00000000
{
"hash" : "e76f2a0d9d6ba7a24965167473e73703323f5d7ac550b0851db89fa3bdfe5279",
"inputs" :
[
{
"address" : "M9YMBVEad1eZMDJQsxd1ZEi3Kr3s9Chcg4",
"previous_output" :
{
"hash" : "c8236026ae7335c1eb946b4878dec24ab6c4cf93f010f442a992701708d8a2f6",
"index" : 0
},
"script" : "[ 3045022100aa41c6d1662f071891489e4ef350741bdbe4bb9907aba52b32b12cd851373f66022061981ec56b53f4b477c99eb2a359ad9e0bf3980d4311ec8c91049598a4e69d3c01 ] [ 030bb96d9e325d9ed67aa6d5fe34818c00964843958087b4e2f4d9c45dc6ce1321 ]",
"sequence" : 4294967295
},
{
"address" : "M8PbY4Qpy2i4gmZ6RdiGYtPF5zL3ReZm8V",
"previous_output" :
{
"hash" : "f5ba3576fcec32aafacea2f2243fbef8e3a5bb6d0446506ca6cc24838b9ba822",
"index" : 0
},
"script" : "[ 3045022100ded58f65789f839c19669293b28a216a2862ddad35e7aae69dc785d94103862402201db02c473f3f3fcadf7216eded34b719fa6bc593ab6c3e890c1f59f9dff96d7f01 ] [ 0392ead8c5478d717149fcaa05bcc26f0f94b06fdf26fea93fa316caf6920b6c9e ]",
"sequence" : 4294967295
}
],
"lock_time" : "0",
"outputs" :
[
{
"address" : "MRviJbicJeskDfpVRTGYwaPmzYHdiF9jdu",
"attachment" :
{
"type" : "etp"
},
"index" : 0,
"locked_height_range" : 0,
"script" : "dup hash160 [ c5bd73cbdaf3bf5ab1a88659c5a7d6f2f2465afb ] equalverify checksig",
"value" : 1
},
{
"address" : "MCympydWbGa2nksSuQeVvtdaM8oxm7oRdD",
"attachment" :
{
"type" : "etp"
},
"index" : 1,
"locked_height_range" : 0,
"script" : "dup hash160 [ 37b801aa8589cc9840332dfbf4652fca891e4dbe ] equalverify checksig",
"value" : 2
},
{
"address" : "MSCEXEEZtLNdS3JjFD7JDfc2QDvU7askXN",
"attachment" :
{
"address" : "MSCEXEEZtLNdS3JjFD7JDfc2QDvU7askXN",
"status" : "transfered",
"symbol" : "XXX",
"type" : "mit"
},
"index" : 2,
"locked_height_range" : 0,
"script" : "dup hash160 [ c8acea9056ed0283cb80ced0f9baaaf5ff31e70a ] equalverify checksig",
"value" : 0
}
],
"version" : "4"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants