Instantiate New Quest
Configure a New Quest.
const { postId, factoryId, questId, transactionHash, error, errorMessage, factoryAccessControls, factoryEscrow, factoryQuestData, factoryMetrics, factoryNFTCreator } = await newEnvoker.instantiateNewQuest({
factoryId: 0,
questDetails: {
title: "Chromadin Chronicle",
description:
"Engage in a Chromadin video binge session for Season 1 and Season 2 of The Dial Pirate Radio . Interactions, mirrors and comments on episodes accrue bonus points.",
cover: "ipfs://QmQk9TqFivUqc6ktosoZVVih9o1uiY3r5Z7F3GCC1FpaJS",
},
maxPlayerCount: 100,
milestones, // see Milestones for struct configuration
joinQuestTokenGatedLogic: tokenGatedLogic // see Token Gated Logic for struct configuration
});Instantiate Quest Props
/* The Factory Id. Set to 0 for instantiating a new Kinora Factory instance, otherwise specify the Id that you are a verified envoker for.*/
factoryId: number;
/* The Quest details struct. The description and cover will be shown within the Lens Post across Lens interfaces. */
questDetails: { title: string; description: string; cover: `ipfs://${string}` };
/* The max number of unique players that can join the quest */
maxPlayerCount: number;
/* Factory Access Controls Contract. */
factoryAccessControls: `0x${string}`;
/* Factory Escrow Contract. */
factoryEscrow: `0x${string}`;
/* Factory Quest Data Contract. */
factoryQuestData: `0x${string}`;
/* Factory Metrics Contract. */
factoryMetrics: `0x${string}`;
/* Factory NFT Creator Contract. */
factoryNFTCreator: `0x${string}`;
/* All milestones within the Quest. See Milestone struct details for how to configure. */
milestones: Milestone[];
/* Token Gated logic for joining the Quest. See Token Gated Logic for struct configuration. */
joinQuestTokenGatedLogic: GatingLogic;
/* (Optional) Wallet instance for Polygon Network. If you have passed the wallet object to the constructor, it is not necessary here. */
wallet?: ethers.Wallet;
/* (Optional) Set to true to approve ERC20 reward tokens to be transfered to the KinoraEscrow contract through the SDK. If set to false, ensure to approve your token spend with the KinoraOpenAction Contract before calling instantiateNewQuest. */
approveRewardTokens?: ethers.Wallet;Response Object
Token Gated Logic
Gated Logic Props
Milestones
Milestone Props
Milestone Eligibility
Milestone Reward
Last updated