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)
(big_map %operators (pair address (pair address nat)) unit)))
(pair (pair (mutez %price) (big_map %reverse_ledger address (list nat)))
(pair (string %serial) (nat %token_id))))
(big_map %token_metadata nat (pair (nat %token_id) (map %token_info string bytes)))) ;
What I did (it didn't work):
import {
Record,
Address,
Mutez,
Nat,
Big_map,
String,
Bytes,
Map,
List
} from "@tezwell/michelson-sdk/literal";
const storage = Record(
{
admin: Address("tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr"),
ledger: Big_map([
[Nat(1), Address("tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr")]
]),
metadata: Big_map([
[
String(""),
Bytes(
"0x68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f36663138333737353065366562383163646434666633363230663738613133322f7261772f653238396663353037326235613931353134383936376239613433333765313835343731363561322f636f6e74726163745f6d6574612e6a736f6e"
)
]
]),
operators: Big_map([]),
price: Mutez(1),
reverse_ledger: Big_map([
[Address("tz1i3veHnR4ogcwKmgugcqnunTmTYP8s8ZAr"), List([Nat(1)])]
]),
serial: String("SERIAL"),
token_id: Nat(1),
token_metadata: Big_map([
[
Nat(1),
Record({
token_id: Nat(1),
token_info: Map([
[
String(""),
Bytes(
"0x68747470733a2f2f676973742e67697468756275736572636f6e74656e742e636f6d2f6f7269616e6131332f35313763373231396531383639333938613765666631343335623862653237392f7261772f326337336132613564353365626466313662633864623831643837343236353964323763646462332f6e66745f6d6574612e6a736f6e"
)
]
])
})
]
])
},
[
[
[
["admin", "ledger"],
["metadata"],
]],
[
["price", "reverse_ledger"],
["serial", "token_id"],
],
[
"token_metadata"
]]
);
console.log("Micheline: ", storage.toMicheline());
console.log("Michelson JSON: ", JSON.stringify(storage.toJSON(), null, 4));
Thanks for your help