-
-
Notifications
You must be signed in to change notification settings - Fork 76
Error when submit NFT minting tx #165
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
Comments
This looks a lot like the issue discussed here and actually an issue of cardano-submit-api and not pycardano OpShin/opshin#46 |
No.We are not using cardano-submit-api directly. We are submitting via the blockfrost frost interface. |
Please read the attached discussion. Blockfrost is internally using the cardano-submit-api
|
Can I submit this somehow to the local cardano node running on my server ? Say using cardano-cli ? In other words can i use the cbor generated and use cardano-cli ? Are the format compatible ...any clue ? Because frankly neither can i change submit api and nor blockfrost. We need to find a solution rather than putting the blame on others ... And i am taking here an example (that should work), as it is in this repository examples. Right ? |
Hi @reitcircles , could you confirm you are using exactly the same script? I just reran the script and it succeeded. Here is the test account, and you can see it just minted two NFTs. |
Got it. Why it coming out as an error while it should not. I have a perfect working example that mints using cardano-cli. here is the problem.
It is messing up the output transaction. It should send it only to the clientAddress the NFT and rest of the change to the payment address and look what it does. It tries to send NFT to both ...!!
I am trying to send the NFT to a different address than the payment address. A perfectly valid address. And then it comes up with the above error. No clue why. |
See these two lines are slightly different?
In the first line, the address is a string (wrong), while in the second, the address is an clientAddr = Address.from_primitive(clientAddress)
min_val = min_lovelace(
chain_context, output=TransactionOutput(clientAddr, Value(0, my_nft))
)
builder.add_output(TransactionOutput(clientAddr, Value(min_val, my_nft))) This is probably one of the most common mistake when using pycardano. I will add a check in the serialization of TransactionOutput to make sure a string is not passed in by mistake. |
thanks ... i was just looking into this already ...let me try. &&& Solved ... |
tagging @while0x1 who had a similar issue |
Auto correction is added in this commit: 4bf6a62. |
I discovered you can take CBOR generated from a cardano-cli build command and then just pass it to a CIP30 wallet for signing after a couple of transformations through pycardano: Procedure: take cbor from cardano cli remove first byte and last 2 bytes
|
Discussed in #164
Originally posted by reitcircles February 14, 2023
When submitting tx for the NFT minting of this example: https://github.com/Python-Cardano/pycardano/blob/main/examples/native_token.py
blockfrost.utils.ApiError: {'error': 'Bad Request', 'message': '"transaction read error RawCborDecodeError [DecoderErrorDeserialiseFailure \\"Byron Tx\\" (DeserialiseFailure 1 \\"Size mismatch when decoding TxAux.\\\\nExpected 2, but found 4.\\"),DecoderErrorDeserialiseFailure \\"Shelley Tx\\" (DeserialiseFailure 1 \\"Size mismatch when decoding \\\\nRecord RecD.\\\\nExpected 4, but found 3.\\"),DecoderErrorDeserialiseFailure \\"Shelley Tx\\" (DeserialiseFailure 1 \\"Size mismatch when decoding \\\\nRecord RecD.\\\\nExpected 4, but found 3.\\"),DecoderErrorDeserialiseFailure \\"Shelley Tx\\" (DeserialiseFailure 1 \\"Size mismatch when decoding \\\\nRecord RecD.\\\\nExpected 4, but found 3.\\"),DecoderErrorDeserialiseFailure \\"Shelley Tx\\" (DeserialiseFailure 43 \\"expected string\\"),DecoderErrorDeserialiseFailure \\"Shelley Tx\\" (DeserialiseFailure 43 \\"expected string\\")]"', 'status_code': 400}
Does anyone have a clue how to solve this ?
The text was updated successfully, but these errors were encountered: