How do I initialise a contract with the following storage -

storage (contract unit);

Used after the command line parameter --init for contract deployment.

I have tried various formats but none of them are working.

This is running on the Alphanet.

1 Answer 1


You need quotes for the parameter itself, and inside quotes for the contract literal. It should look like this.

--init '"KT1..."'
  • I did try that but the following error comes up - Ill typed data: 1: "KT1PwX3RWLGikTRsDTmRh3Bnxs9dUphMn8GS" is not an expression of type contract unit Type string is not compatible with type unit. May 4, 2019 at 15:11
  • You suggestion does work for - storage (contract string); May 4, 2019 at 15:14
  • I updated my question to mention that this is running on the Alphanet. May 4, 2019 at 15:16
  • alphanet.tzscan.io/… This contract takes a string parameter. It's thus a contract string and not contract unit
    – Arthur B
    May 4, 2019 at 16:05
  • 1
    Ahh, ok, I understand now. The types after the contract are the expected parameters. I deployed a new contract with a Unit parameter (alphanet.tzscan.io/KT1UHQMbgKPjPVRVHaz78kRPPfTesEtRTPjv) and now my test contract is able to run correctly using this new deployed contract. Thanks for your help. May 4, 2019 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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