Issue with contract deployment into testnet

We have upgraded our existing contracts to the smartpy new syntax and able to compile the contracts; however, getting this error while deploying it in ghostnet from smartpy online IDE

failed(permanent: proto.016-PtMumbai.michelson_v1.ill_typed_contract), (permanent: proto.016-PtMumbai.michelson_v1.invalid_constant), (permanent: proto.016-PtMumbai.destination_repr.invalid_b58check)

I don’t know what I’m missing. any guidance to resolve the same?

Your problem is probably related to addresses.

The SmartPy simulator and compilation allows any addresses that starts with tz1 to tz4 and KT1 but the chain only allow valid addresses encoded using b58.

You can check that you don’t use an invalid address and replace it directly in the origination page using the edit JSON code button or modify your code / scenario.

Thank you for the info, Jordan.

I have updated my scenarios and run it again. However, still it throws the same.


  1. My contracts init requires few sp.address, so I was hardcoded it previously.
  2. Now I replaced those with admin = sp.test_account(“admin”), and I’m passing admin.address in the scenario

Also I have double checked that no other address are there in the code & storage JSON.

Hard coded addresses are not a problem and may be better to simplify the deployment process.

You have two sp.address("") in your code. These addresses are accepted by SmartPy (maybe we should not allow this) but it’s not allowed on the chain.


Simplify your code as much by removing entrypoint and storage values to the point where you cannot remove anything without removing the problem. It will help you find where it can be.

1 Like

hmm, is there any alternative for the sp.address(“”) ?


After making the changes on the same, i was able to deploy the contract successfully.

Thank you for the help, Jordan!!

The alternatives to null address are:

  • Improve the code so you don’t need to initialize an address to null.

  • Option: set it with NONE, and then sp.Some(...) when it’s not null. You may avoid doing that if it’s null only during an origination process and never again.

  • Address that you know or sp.sender (notice sp.sender doesn’t work in the init)

  • KT18amZmM5W7qDWVt2pH6uj7sCEd3kbzLrHT, it’s the lowest KT1 address, sometimes used as a null address.

Some more info about addresses:

KT1XvNYseNDJJ6Kw27qhSEDF8ys8JhDopzfG is the highest KT1 address.