0

I try to initialize a smart contract with five arguments being nat * timestamp * nat * timestamp * address. However, I only want to fill the last argument with some value but for the first four I try to fill nil. But I cannot get myself right on the format. Any one may help on this? Many thanks.

I tried below code,

./tezos-client originate contract oracle_test00 transferring 0 from alice running oracle.tz --init 'Pair (Pair (Pair nil nil) nil nil) "tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg"'

or

./tezos-client originate contract oracle_test00 transferring 0 from alice running oracle.tz --init 'Pair (Pair (Pair "" "") "" "") "tz1PKKC9NTsxxfwYpg1bVAY5k5AKuPYe9gpg"'

Both are wrong.

2

There is no nil on tezos. You will need to use the option type, which can be None or Some <value>.

A SmartPy example

enter image description here

1
  • Thank you, Rodrigo. Recently I moved on with filling unrealistic values ./tezos-client originate contract contract_oracle transferring 0 from alice running oracle.tz --init '(Pair (Pair (Pair 0 "1970-01-01T03:41:46Z") (Pair 0 "1970-01-01T03:41:46Z")) "tz1Z99RkyVoeRo8Xo15VkBpsNNcRSTsJ7Pzk")' --burn-cap 0.2. As both the None and Some "foo" format failed. May come back later on the detail as I still feel a bit uncomfortable with the way dealing with this case. Jul 27 at 2:51

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.