-
I'm using an HDWallet and TransactionBuilder to submit a transaction that should mint a royalty NFT token but I'm getting an error returned from blockfrost that looks like it's having trouble decoding the CBOR. Any ideas where to begin debugging this? 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 218 \"expected word\"),DecoderErrorDeserialiseFailure \"Shelley Tx\" (DeserialiseFailure 218 \"expected word\")]"', 'status_code': 400} BlockFrostNode.transfer_ada succeeds. However, BlockFrostNode.mint_royalty_token which is very similar (except for adding in the NFT stuff) fails. See the next comment for links to the code. I guess it's something to do with how the policy is created and/or the policy signing keys used since it's the same input wallet, address, and signing keys in both cases. Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Looks like the code I pasted did not format very well. If anyone wants to look, here it is in github: |
Beta Was this translation helpful? Give feedback.
-
Finally figured it out. The slot number passed to the InvalidHereAfter policy was a float instead of an int. Check your datatypes if getting cbor decode errors. |
Beta Was this translation helpful? Give feedback.
Finally figured it out. The slot number passed to the InvalidHereAfter policy was a float instead of an int. Check your datatypes if getting cbor decode errors.