Missing Script Witnesses UTXOW

Hello all,

I just made some tokens and wanted to send some to a friend of mine. However, when I attempt to submit the transaction I get the following message:

Shelley command failed: transaction submit Error: Error while submitting tx: ApplyTxError [LedgerFailure (UtxowFailure (MissingScriptWitnessesUTXOW (fromList [])))]

What am I doing wrong? This is the transaction that I made:

cardano-cli transaction build-raw \
--mary-era \
--fee 178833 \
--tx-in bb6cc5c0759697a29743e7c07d6210e2ef88d25bba372ba35332b1bc65943cbd#0 \
--tx-out addr1q8k2d68ljr7ayv550vznqmffd5eyhj5hp52jucpekuahxhxtuklnjl3uqgwqtj927r5wtyv602x9030ejqxh6l8u2u3sddm6sp+2641586+"1000000 49cbbb48ab845b32be96b91cd96985468bd155b5d34cae4233c70b9f.Gulden" \
--out-file matx.raw

Help is much appreciated!

1 Like

What arguments did you use in cardano-cli transaction sign? It looks like --script-file might have been included when it shouldn’t have been.

2 Likes

These are the arguments I used in the transaction:

cardano-cli transaction sign \
--signing-key-file payment.skey \
--signing-key-file policy.skey \
--script-file policy.script \
--mainnet \
--tx-body-file matx.raw \
--out-file matx.signed

I did use script-file. Will removing it be enough to fix the transaction or should I change other arguments as well?

2 Likes

Actually, you’ll need to remove both policy.script and policy.skey, which are only needed when minting or burning. You only need the payment signing key for the --tx-in. Evidently, the ledger rejects transactions that have superfluous witnesses.

3 Likes

That makes sense. I understand it now. I just changed all the arguments and now it seems to work just fine :slight_smile: Thanks!

2 Likes

Hi all!

I am getting a similar error after sumit a transaction with cardano-cli:
[("tx",Object (fromList [("txid",String "txid: TxId {_unTxId = \"c25b72bec788c4689619197a37db2b2f8333ef83a6167bae6d5b6a113e33b20c\"}")])),("kind",String "TraceMempoolRejectedTx"),("mempoolSize",Object (fromList [("numTxs",Number 0.0),("bytes",Number 0.0)])),("err",Object (fromList [("kind",String "MissingScriptWitnessesUTXOW"),("missingScripts",Array [String "8c506607930699cd719dde56a6474928e8b0939ab2414935e9872755"])]))]

I am minting so these have been my steps:

  1. Build de transaction:

cardano-cli transaction build-raw \
–mary-era \
–fee 180461 \
–tx-in b1c823460e10a9e8cf8f3e37a68a3ba369959377a644480ccd585a7742f5777f#0 \
–tx-out addr_test1vzne8r32tzcmg84x5rspglkmhdyvdp8z4cqkqhsdswppkcsdnrnqc+9819539+“10000000 8c506607930699cd719dde56a6474928e8b0939ab2414935e9872755.melcoin” \
–mint=“10000000 8c506607930699cd719dde56a6474928e8b0939ab2414935e9872755.melcoin” \
–out-file matx.raw

  1. Sign de transaction:

cardano-cli transaction sign \
–signing-key-file pay.skey \
–signing-key-file policy/policy.skey \
–script-file policy/policy.script \
–testnet-magic 1097911063 \
–tx-body-file matx.raw \
–out-file matx.signed

  1. Submit de transaction:

cardano-cli transaction submit \
–tx-file matx.signed \
–testnet-magic 1097911063

After submit I get the error above but I can’t see what I am doing wrong.

In the case it helps this is my local wallet where I am sending my native tokens:

Any help is very welcome!!!

Thank you very much in advance!

You might want to verify that the file policy/policy.script does indeed hash to 8c506607930699cd719dde56a6474928e8b0939ab2414935e9872755 and that the required-signature key hash inside that file does match the hash for policy/policy.vkey.

1 Like

Thank you very much for your response bwbush :wink:

As you can se the first requirement you pointed up is ok, the second one I really don’t understand what exactly are you meaning hahah, what it is ‘required-signature key hash inside policy/policy.script’ ? the “keyHash” value? so it would have to match the hash for policy/policy.vkey? and how could I check that? what means “match the hash for policy/policy.vkey”, it means be equal to the value of “cborHex”?

I am sorry if my questions are too basic haha, I am just starting with cardano hahah

Thank you very much for your time and response @bwbush :slight_smile: :stuck_out_tongue:

It looks like you are using the wrong value for the policy ID in your transaction: instead of 8c506607930699cd719dde56a6474928e8b0939ab2414935e9872755, which is the hash of the verification key policy/policy.vkey, you need to compute the policy ID from the hash of policy/policy.script. The following command will compute the policy ID for that script:

$ cardano-cli transaction policyid --script-file policy/policy.script 
68295ef9586b6e278bbcbce58d981313322e4970a463a88cde0d94c7

If you replace 8c506607930699cd719dde56a6474928e8b0939ab2414935e9872755.melcoin in your transaction with 68295ef9586b6e278bbcbce58d981313322e4970a463a88cde0d94c7.melcoin, then the transaction should validate.

1 Like

Thank you very much @bwbush , it was that!! Now is working :stuck_out_tongue: !!!

2 Likes

Hello all,
I’m very exciting with the cardano project!
I just received some test tokens from Faucet and wanted to send it back. However, when I attempt to submit the transaction I get error message.

My testnet fullUTXO is the following:

This is my cardano-cli command :

cardano-cli transaction build-raw
–tx-in 1f3e658961511244611e365a6921b6d6b3edd0bd0ff3786cd1b2f88a9a0052ec#0
–tx-in 22c390aaa50154eb3550d40b123bb9b07c6e57d8e6ee7f4fa8349d4e5acdfe02#0
–tx-in 37cc1b8ff8c782a50c45b8f45c28e6e5e322d0fd51c8f1e56813c1ae8b49db17#0
–tx-in 4269911d93800c9ca22d96719585f8f6f2232ad4018ac588eae90c98e46648a6#0
–tx-in 44a35553e98bc75baae3db501972fda8f722eb6f15ecc19121456243f13a31d8#0
–tx-in 603e63271762ffd22c20b061918a12e23dc70ae9d3596d26b163b71f7b6cb3f6#0
–tx-in 67bc631f0ba2a440fba27db91fef21eb64dd13b6fdc3e075068af7b78fb6765c#0
–tx-in 6fd260cd3b4473e31f06269857994a5e0dab7001aabe644003a71410276dbe7e#0 \
–tx-in 79f17e13be708d4204e0abe8b177f1a0414f5306fb363144cf66487d26e48f78#0 \
–tx-in 7a0b3c391fb2753db7d9ad6c4f4e896c30c8c8932d059294260796b570e0823e#0 \
–tx-in 7d4b9f00eba9bc08166baa51d77a3221d49d92baa4dbe9722dc837977d101528#0 \
–tx-in 8ce6bafe6232ea523462520e9d607040a1e6475c326b52678d90014823e3079b#0\
–tx-in be3975f71996b62cc34f1cdc87d676e619415ddb1f4672ffc372db913fe2202e#0 \
–tx-in bed6e07f8e541761df4f3d4cdf909d9433d61c1a16856aee7f56c232d6c34164#0 \
–tx-in bf1ddbf65fb6be91c89e68f685b4ecbf14e082340fae2238b1be023c38d3a0fe#0 \
–tx-in d1689b29f2af9f7fc3e01a45e46883edef041df10ffc4c735a30547a7b3192b8#0 \
–tx-in e09ab2afe6a8922c9e333bd2989cfb55fa182f76be6c3cc95001b631984b8dc2#0 \
–tx-in ea223682bc7a2e47d3a76bda152c7c20a1b025cb591e105747f6e518402c078a#0
–tx-in ebdfef0c8aface6bbe665e803974c0af805702168141618c1f4cd958d05cb7c8#0
–tx-in f24327d0dd85847a85397f3c6ac52c2029aa808ce3232f65f5cbbc7457896074#0
–tx-out addr_test1qpmw2ehk6skme3yleaasw3e3jy02chyc5248avhvx3q2tqltsxy4g2r6asrteksdrmuyda690ku6z6nalsg9msfsny3q34l46g+20388613339
–tx-out addr_test1qqr585tvlc7ylnqvz8pyqwauzrdu0mxag3m7q56grgmgu7sxu2hyfhlkwuxupa9d5085eunq2qywy7hvmvej456flknswgndm3+13000000+“7 6b8d07d69639e9413dd637a1a815a7323c69c86abbafb66dbfdb1aa7”
–invalid-hereafter 24498829
–fee 240433
–out-file tx.raw

Can you help me?

Thank you in advance