3

I have a contract with storage as

let%init storage = (Map : (key_hash, nat)map)

I want to deploy the contract using tezos-client originate contract command.

I am unable to init storage, tried several options.

--init '(Pair {} (Pair {} 0))'

I get the following error:

Ill typed data: 1: (Pair {} (Pair {} 0))
is not an expression of type map key_hash nat

1 Answer 1

0

The error message describes the expected type: "is not an expression of type map key_hash nat"

Maps are defined with braces { } and each element starts with Elt and is delimited from others with a semi-colon. If you only have one element in your map you don't need a semi-colon.

--init '{ Elt "tz1account" 0 }'

Your Answer

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

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