Complete Milestone

Player Milestone Completion and Reward Claim.

To complete a Milestone, players "Act On" the same Lens publication, where the KinoraOpenAction Contract assesses their eligibility to complete and claim the next Milestone on the Quest.

If eligible, it automatically withdraws their ERC20 rewards from your Kinora Escrow Contract instance and/or mints to their wallet any reward ERC721 NFTs, marks the Milestone as complete, and, if there are remaining Milestones in the Quest, allows them to continue with their progress.

Players can only claim their rewards and complete a milestone if they have met all token gated and video metric conditions. See more on how eligibility is verified here.

If the Player is completing the final Milestone in a Quest, the contract will also verify the Player as having finished the Quest.

const { txHash, error, errorMessage } = await newDispatch.playerCompleteQuestMilestone("0x012d-0x0106", new ethers.Wallet(process.env.PLAYER_PRIVATE_KEY, polygonProvider));

Player Join Quest Props:

/* The pubId of the invoked Quest. */
pubId: string;

/* Wallet instance for the Player on Polygon Network. */
wallet: ethers.Wallet;

Result Object:

/* The txHash for acting on the Publication and completing the milestone and/or Quest. */
txHash?: `0x${string}`;

/* Boolean to indicate whether an error was encountered during completion and rewards claim. */
error: boolean;

/* Message of the encountered error. */
errorMessage?: string;

Last updated