I have a contract of type:
pair (pair (list nat) (pair mutez (map address (list nat))))
(pair address (pair address bool))
What is an example of a valid initial storage that can be passed to tezos-client originate contract.... --init
?
Tezos Stack Exchange is a question and answer site for users, experts, and developers of the Tezos blockchain project. It only takes a minute to sign up.
Sign up to join this communityMore details would help, but from what you put in the comment you have several problems with your current init.
Some examples for your sub types:
(map address (list nat))
would have an init of '{ Elt "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp" {0} }'
(pair (list nat) (pair mutez (map address (list nat))))
would have an init of 'Pair {1} (Pair 100 { Elt "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp" {0} })'
You can use try-michelson to generate valid of a given storage type. For instance, if you give it the contract, with the same storage as in your example:
parameter unit;
storage (pair (pair (list nat) (pair mutez (map address (list nat)))) (pair address (pair address bool)));
code { FAILWITH; }
And press "generate storage", you will have an example initial storage such as:
(Pair (Pair { 172 ; 24263 } (Pair 1926673630438126278 { Elt "tz1VUTd4vuyvobzTYwDjVS6BJYNVnZJ773nn" { 196 ; 39 ; 27641 } ; Elt "tz1bNMyAPYMoQ92NphetXY54Uizvw6pH45Sn" { 11429 ; 39285 ; 14428 } })) (Pair "tz1aJLJHX1pumbM3MmPJ3zzH2sEk9T8JyFTE" (Pair "tz1MQYB5eY4ZMrp5Qr3fanftf3R3i4KFPstV" False)))
OK, so i think i got it:
'Pair (Pair {0} (Pair 0 { Elt "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp" {0}})) (Pair "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp" (Pair "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp" False))'
But now i have a real error:
At line 43 characters 19 to 27,
The FAIL instruction must appear in a tail position.
But compiling the Fi has no error, ist this in my --init
parameter something wrong, or really in the .fi file ?
'pair (pair (list 0) (pair 0 (map { Elt "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp" (list 0)))) ; (pair "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp" ; (pair "tz1amgADBK3LLGxgqPK8VAxHj7fmxX3FvWRp"} False))'
but i'm still confused.