Skip to content

rawissueasset with invalid address results in fee outputs #853

Description

@shesek

It appears like rawissueasset does not reject invalid addresses provided in {asset,token}_address, but instead sends the asset and the reissuance tokens to fee outputs:

$ issuetx=$(ecli fundrawtransaction $(ecli createrawtransaction '[]' '{"'$(ecli getnewaddress)'":0.00001}') '{"feeRate":0.00005}' | jq -r .hex)
$ issuetx=$(ecli rawissueasset $issuetx '[{"asset_amount":1,"token_amount":3,"asset_address":"foobar","token_address":"foobar"}]' | jq -r '.[0].hex')
$ txid=$(ecli sendrawtransaction $(ecli signrawtransactionwithwallet $(ecli blindrawtransaction $issuetx) | jq -r .hex))
$ ecli getrawtransaction $txid true | jq -c .vout[]

{"value-minimum":1e-08,"value-maximum":687.19476736,"ct-exponent":0,"ct-bits":36,"surjectionproof":"030007eb1b7e2096f8648657d17f63e0894e1e37d2d7afaf750079ae474373f7359c358e73b64e533ffe56672fe588ffaf0ceaa06fee87cd0716b20ded198e45e123bb765d5ecbccd27fec05173056f3c34a18acd35212b50956b879a27ada79097e5eea4d3f6e996ca934d961b327f08796a4e42b47c317b5af3e6a013b6e2aad87bf","valuecommitment":"094862037cb3307c9827ef2a4dad1da97878b2d46a668c3de25b419d8cef9fc765","assetcommitment":"0b5ea2fef2352dcb86afe5b1016a65cc363ad3f9f65571763bacf34d903e0fd734","commitmentnonce":"02580ea6b7d071ae24c14ad49468b89f1acfea39a3b1cbe96a08f3af9e90beccda","commitmentnonce_fully_valid":true,"n":0,"scriptPubKey":{"asm":"OP_HASH160 e937a357dcf66c67480e3552863397035e8d5281 OP_EQUAL","hex":"a914e937a357dcf66c67480e3552863397035e8d528187","reqSigs":1,"type":"scripthash","addresses":["XYcNweAGbbWKmNZoCmaEqzcJmomgxbxUat"]}}
{"value":3,"asset":"ae530b4c615b7247903c238a4b09899bd700526bb755a917c7fd08d7fd8665b2","commitmentnonce":"","commitmentnonce_fully_valid":false,"n":1,"scriptPubKey":{"asm":"","hex":"","type":"fee"}}
{"value":1,"asset":"3281155b4f6422be187b9ae0d1ffdc2291b14f905b2f37928c468418f2789c64","commitmentnonce":"","commitmentnonce_fully_valid":false,"n":2,"scriptPubKey":{"asm":"","hex":"","type":"fee"}}
{"value-minimum":1e-08,"value-maximum":1374.38953472,"ct-exponent":0,"ct-bits":37,"surjectionproof":"0300077fb01a9a2641efc73870ef27b1f85b7281a529c3eaba61c14016033267bc49ab5cef1fa2a493800585f91eb9b2e8f603fb50851691220ac90d2f8c82e2c3a005f38024f01d69081663e92537ccf6d303ccc1f9539724ce908155f7d06efe591ef0903f4a5ba936f42702ed99d70464d5a04a4ff7c9b479d2292b1e7db9dbb5bb","valuecommitment":"09c389efc9b47ddfc603971f45d8a2a09fd559b13b042fb3b9732b4ff3c9351357","assetcommitment":"0abb66e6ee32426f09ba3c1d41964853a8b8d4d02f65b0b9a78313aaf8b3633770","commitmentnonce":"02562a0264ca50a6a19ba242e89ddf939e9b0ab42747460fde35e66437bf1dafcd","commitmentnonce_fully_valid":true,"n":3,"scriptPubKey":{"asm":"OP_HASH160 803c64df1cdda12d92696558b98f0b16fc8d9d83 OP_EQUAL","hex":"a914803c64df1cdda12d92696558b98f0b16fc8d9d8387","reqSigs":1,"type":"scripthash","addresses":["XP3Hgx3i3hgZbKVrSKzwSojTSGbfRj1o33"]}}
{"value":9.495e-05,"asset":"5ac9f65c0efcc4775e0baec4ec03abdde22473cd3cf33c0419ca290e0751b225","commitmentnonce":"","commitmentnonce_fully_valid":false,"n":4,"scriptPubKey":{"asm":"","hex":"","type":"fee"}}

Note the second and third outputs, whose asset ids match that of the newly issued asset and token.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions