1

I am in the middle of migrating my DApp from Ithacanet to Ghostnet, the majority of the migration is done, but I am unable to mint (it's a minting contract based off of hin) using the smart contract on Ghostnet. On Better-Call-Dev I am seeing a metadata error for the contract that I wasn't seeing on Ithacanet:

https://better-call.dev/ghostnet/KT19WpcgGX8dZ6YAWJUvxxcUFo5NYTRWCwhu/metadata

Would this be preventing me from minting using the contract? When attempting to mint I am getting the following error -

{
"name": "TransactionInvalidBeaconError",
"title": "Transaction Invalid",
"message": "[TRANSACTION_INVALID_ERROR]:The transaction is invalid and the node did not accept it.",
"description": "The transaction is invalid and the node did not accept it.",
"data": [
    {
        "kind": "temporary",
        "id": "proto.013-PtJakart.michelson_v1.runtime_error",
        "contract_handle": "KT1KUwvtCji3PU8w4s1RbKoaGhrcE9H4tTBE"
    },
    {
        "kind": "temporary",
        "id": "proto.013-PtJakart.michelson_v1.script_rejected",
        "location": 321,
        "with": {
            "string": "FA2_NOT_ADMIN"
        }
    }
]

}

It is the same contract as the one on Ithacanet and deployed in the same way through smartpy. The contract is able to handle non-admin minting which is why I am confused on the FA2_NOT_ADMIN error and I even set the admin address to mine. Any thoughts on what is causing this issue?

1
  • 2
    Those are two unrelated issues, BCD shows error because you have "example.com" as the link to the metadata json file. Make sure that you have valid admin address in the storage, currently it is "tz1hdQscorfqMzFqYxnrApuS5i6QSTuoAp3w" is that the same account you are using for minting? Aug 3 at 13:23

2 Answers 2

4

Can you share your code?

What I can say at the moment:

  • Your metadata bigmap contains the value "https://example.com" which is invalid. Perhaps you forgot to change that or you are originating from a test instead of the compilation target.
  • The contract's administrator is tz1hdQscorfqMzFqYxnrApuS5i6QSTuoAp3w. Are you using this address on Ghostnet to call the mint entrypoint?
  • I confirm you that the mint entrypoint fails if not admin.
  • metadata is a big map. Usually (and that's what you are doing) you insert an empty key and a value referring to a JSON file stored on IPFS (probably what you want to do). There is no way your IPFS file interferes with the mint entrypoint.

Can you share your code? Using the share button and the IPFS link?

2

The metadata is invalid because it points to https://example.com, which has no content. You need to provide a link that points to valid json or store the encoded metadata in the storage.

Contract metadata specification

About the FA2_NOT_ADMIN error, it means you are not the administrator. The deployed contract enforces that only the administrator can mint.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.