I noticed a sudden stop in minting from a contract deployed on chain. Things we’re working fine and then suddenly it does not mint and returns a contract logic error.
This is a recent transaction hash of a failed transaction from the same Contract.
b8e787d781aea41e15a57f7f9a3d65e06fa393cf7893f80ac3cf35c8fb276076, index 9423
The reject reason is -1 in the transaction which often means that the smart contract cannot parse your input parameter (assuming that the parseError is the first variant of your Error enum in the smart contract).
You can use the read box to debug your input parameter: https://sctools.mainnet.concordium.software/
e.g. I used an old input parameter from a previous transaction and it passes in the readbox. Meaning the only error is that it cannot deserialize/decode the “returnParameter” .
You should be able to use the input parameter in the writeBox now.
What you shared works, but works perfectly with numbers below 99, I noticed from 100 and above doesn’t mint. If you see the previous metadata I provided, I appended a zero to the number. so basically numbers above 100 should have a way of minting them. Could you please give me a suggestion of what to do with 100 and above?
you might use a small type e.g. tokenIdU8 in your smart contract (meaning only one byte for the tokenId)? Can you look up the type that you use for the token_id in your smart contract.