1

I am trying to learn smart contracts on Tezos and decided to originate my own. The contract is expecting the following storage:

pair (pair (address %owner)
             (list %received
                (pair (pair (timestamp %expiration) (string %hash)) (string %sendr) (int %threadID))))
       (list %sent
          (pair (pair (timestamp %expiration) (string %hash)) (string %receiver) (int %threadID)))

I then tried to initialize the contract with empty lists but continuously get the ill typed data error:

Ill typed data:
  1: (pair (pair (address "tz1dzhKD21HWFgEHqB1BiY4BoTWoDa7y6i77") (list {})) (list {}))
is not an expression of type
  pair (pair (address %owner)
             (list %received
                (pair (pair (timestamp %expiration) (string %hash)) (string %sendr) (int %threadID))))
       (list %sent
          (pair (pair (timestamp %expiration) (string %hash)) (string %receiver) (int %threadID)))
At line 1 characters 0 to 80, value
  (pair (pair (address "tz1dzhKD21HWFgEHqB1BiY4BoTWoDa7y6i77") (list {})) (list {}))
is invalid for type
  pair (pair (address %owner)
             (list %received
                (pair (pair (timestamp %expiration) (string %hash)) (string %sendr) (int %threadID))))
       (list %sent
          (pair (pair (timestamp %expiration) (string %hash)) (string %receiver) (int %threadID))).
At line 1 characters 0 to 80,
unexpected type name pair, only a constant constructor can be used here.
Fatal error:
  origination simulation failed

I have tried initializing it with various different inputs but can't seem to get it right.

./tezos-client -E https://testnet-tezos.giganode.io  originate contract test_contract transferring 0 from test_wallet running ~/contract.tz -D --init 'pair (pair (address "tz1dzhKD21HWFgEHqB1BiY4BoTWoDa7y6i77") (list {})) (list {})'

1 Answer 1

1
(Pair (Pair "tz1dzhKD21HWFgEHqB1BiY4BoTWoDa7y6i77" {}) {})

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.