3

I am using the following command

originate contract new for mgr transferring qty from src running prg 

for deploying a contract using Command Line Interface as mentioned in CLI document. This command takes --init "data" and this can be used for initializing the storage. My contract accepts two params for initializing the storage as follow:

let%init storage (param1 : key_hash)(param2 : address) = (param1, param2)

How should I pass the parameter to initialize the storage? I have tried multiple combinations, specifically three of them are as follow:

a) "(Pair : {tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg} {KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7})" 

b) "(Pair tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7)"

c) "{Pair tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7}"

but these combinations shows the following error:

a) Invalid primitive:
  1: Pair :
  2:   { tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg }
  3:   { KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7 }
Primitive tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg has invalid case.   

b) Invalid primitive:
  1: Pair tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7
Primitive tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg has invalid case.

c) Invalid primitive:
  1: { Pair tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7 }
Primitive tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg has invalid case.

Please explain what went wrong here?

  • I have same problem. I am usin folowing command: ./tezos-client originate contract ConTes 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 ti – Chmoshk Jun 9 at 14:14
3

Turns out this supposed to be passed like this:

'(Pair "tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg" "KT1GE2AZhazRxGsAjRVkQccHcB2pvANXQWd7")'
  • 1
    Not sure whether I should remove this question or not as this is a trivial issue. – user_184 Apr 16 at 18:31

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.