1

I am trying to pass the correct storage parameters in json to be able to deploy my smart contract. Thank you for your attention...

(pair (pair (pair (pair (address %admin) (big_map %ledger nat address))
                      (pair (big_map %metadata string bytes) (nat %next_token_id)))
                (pair (pair (big_map %operators (pair address (pair address nat)) unit) (nat %price))
                      (pair (big_map %reverse_ledger address (list nat)) (string %serial))))
          (pair (big_map %token_metadata nat (pair (nat %token_id) (map %token_info string bytes)))
                (pair %transfert (address %to_) (nat %token_id) (nat %amount) (nat %_price)))) ;

What I did (it didn't work):

(Pair (Pair (Pair (Pair "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr" { Elt 1 "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr" }) (Pair { Elt "" 0x68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f36663138333737353065366562383163646434666633363230663738613133322f7261772f653238396663353037326235613931353134383936376239613433333765313835343731363561322f636f6e74726163745f6d6574612e6a736f6e } 2)) (Pair (Pair {  } 1) (Pair { Elt "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr" { 1 } } "SERIAL"))) { Elt 1 (Pair 1 { Elt "" 0x68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f35313763373231396531383639333938613765666631343335623862653237392f7261772f326337336132613564353365626466313662633864623831643837343236353964323763646462332f6e66745f6d6574612e6a736f6e }) }) 

Thanks for your help

2
  • Are you sure you want this part? (pair %transfert (address %to_) (nat %token_id) (nat %amount) (nat %_price)) Mar 11 at 15:13
  • Yes it was the Ligo ide that generated it for me during the compilation
    – oriana
    Mar 11 at 15:16

1 Answer 1

0

codesandbox (Output can be seen in the console)

Micheline

(Pair (Pair (Pair (Pair "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr" { Elt 1 "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr" }) (Pair { Elt "" 0x68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f3666313833373735306536658613133322f7261772f653238396663353037326235613931353134383936376239613433333765313835343731363561322f636f6e74726163745f6d6574612e6a736f6e } 2)) (Pair (Pair {  } 1) (Pair { Elt "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr" { 1 } } "SERIAL"))) (Pair { Elt 1 (Pair 1 { Elt "" 0x68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f35313763373231396531383639333938613765666631343335623862653237392f7261772f326337336132613564353365626466313662633864623831643837343236353964323763646462332f6e66745f6d6574612e6a736f6e }) } (Pair "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr" (Pair 1 (Pair 1 1)))))  

Michelson JSON

{
    "prim": "Pair",
    "args": [
        {
            "prim": "Pair",
            "args": [
                {
                    "prim": "Pair",
                    "args": [
                        {
                            "prim": "Pair",
                            "args": [
                                {
                                    "string": "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr"
                                },
                                [
                                    {
                                        "prim": "Elt",
                                        "args": [
                                            {
                                                "int": "1"
                                            },
                                            {
                                                "string": "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr"
                                            }
                                        ]
                                    }
                                ]
                            ]
                        },
                        {
                            "prim": "Pair",
                            "args": [
                                [
                                    {
                                        "prim": "Elt",
                                        "args": [
                                            {
                                                "string": ""
                                            },
                                            {
                                                "bytes": "68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f3666313833373735306536658613133322f7261772f653238396663353037326235613931353134383936376239613433333765313835343731363561322f636f6e74726163745f6d6574612e6a736f6e"
                                            }
                                        ]
                                    }
                                ],
                                {
                                    "int": "2"
                                }
                            ]
                        }
                    ]
                },
                {
                    "prim": "Pair",
                    "args": [
                        {
                            "prim": "Pair",
                            "args": [
                                [],
                                {
                                    "int": "1"
                                }
                            ]
                        },
                        {
                            "prim": "Pair",
                            "args": [
                                [
                                    {
                                        "prim": "Elt",
                                        "args": [
                                            {
                                                "string": "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr"
                                            },
                                            [
                                                {
                                                    "int": "1"
                                                }
                                            ]
                                        ]
                                    }
                                ],
                                {
                                    "string": "SERIAL"
                                }
                            ]
                        }
                    ]
                }
            ]
        },
        {
            "prim": "Pair",
            "args": [
                [
                    {
                        "prim": "Elt",
                        "args": [
                            {
                                "int": "1"
                            },
                            {
                                "prim": "Pair",
                                "args": [
                                    {
                                        "int": "1"
                                    },
                                    [
                                        {
                                            "prim": "Elt",
                                            "args": [
                                                {
                                                    "string": ""
                                                },
                                                {
                                                    "bytes": "68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f35313763373231396531383639333938613765666631343335623862653237392f7261772f326337336132613564353365626466313662633864623831643837343236353964323763646462332f6e66745f6d6574612e6a736f6e"
                                                }
                                            ]
                                        }
                                    ]
                                ]
                            }
                        ]
                    }
                ],
                {
                    "prim": "Pair",
                    "args": [
                        {
                            "string": "tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr"
                        },
                        {
                            "prim": "Pair",
                            "args": [
                                {
                                    "int": "1"
                                },
                                {
                                    "prim": "Pair",
                                    "args": [
                                        {
                                            "int": "1"
                                        },
                                        {
                                            "int": "1"
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
} 
1
  • 1
    Thanks very much :)
    – oriana
    Mar 11 at 15: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.