4

I am using folowing command:

./tezos-client originate contract TestContract for tz1address transferring 1 from tz1address running contes.fi --init 'pair (map "KT1address" 1) (map "KT1address" "2019-06-09 00:00:00")'

and get error:

Ill typed data: 1: (pair (map "KT1address" 1) 2: (map "KT1address" "2019-06-09 00:00:00")) is not an expression of type pair (map address mutez) (map address timestamp) From line 1 character 0 to line 2 character 71, value (pair (map "KT1address" 1) (map "KT1address" "2019-06-09 00:00:00")) is invalid for type pair (map address mutez) (map address timestamp). From line 1 character 0 to line 2 character 71, unexpected type name pair, only a constant constructor can be used here.

Please explain to me what i am doing wrong.

  • Nobody can help me?? – Chmoshk Jun 13 at 12:56
1

Your error message describes the type you are failing to initialize properly: "is not an expression of type pair (map address mutez) (map address timestamp)".

First you need to specify each map with braces { }, and every element inside the braces begins with an Elt and is separated from other elements by a semi-colon. In your case you only have one element per map so you don't need any semi-colon.

You would use the following,

--init 'Pair { Elt "KT1address" 1 } { Elt "KT1address" "2019-06-09 00:00:00" }'

if you were initializing each map with 2 elements, it would look like,

--init 'Pair { Elt "KT1addressone" 1 ;  Elt "KT1addresstwo" 1} { Elt "KT1addressone" "2019-06-09 00:00:00" ; Elt "KT1addresstwo" "2019-06-09 00:00:00" }'

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.