I'm using this smart contract: https://github.com/claudebarde/taquito-pinata-tezos-nft/blob/main/contract/NFTS_contract.mligo
I can deploy it on the https://ide.ligolang.org/ using the storage they have commented out at the end of the contract, copy-paste the contract (KT...) to my taquito application and everything works.
But, I want to deploy it and provide the storage directly in my taquito/jsligo application, but I have no idea how to declare/set/assign the store.
e.g.
import { TezosToolkit } from "@taquito/taquito";
import { importKey } from "@taquito/signer";
import { RPC_URL } from "./utils/constants";
import { InMemorySigner } from "@taquito/signer";
import dotenv from "dotenv";
dotenv.config();
const Tezos = new TezosToolkit(RPC_URL);
const privateKey = process.env.WALLET_PRIVATE!;
importKey(Tezos, privateKey);
// generic.json is referring to Michelson source code in JSON representation
const genericMultisigJSONfile = require("../smart_contract/samples/fa_2.tz");
const storage = /* I have no idea */
function sign() {
Tezos.setProvider({ signer: new InMemorySigner(privateKey) });
Tezos.contract
.originate({
code: genericMultisigJSONfile,
storage: storage,
})
.then((originationOp) => {
console.log(
`Waiting for confirmation of origination for ${originationOp.contractAddress}...`
);
return originationOp.contract();
})
.then((contract) => {
console.log(contract);
})
.catch((error) => console.log(`Error: ${JSON.stringify(error, null, 2)}`));
}
sign();