Verify Player Milestone

Player Milestone Completion Validation.

Before a player can claim rewards for milestone completion, the Quest Envoker must call setPlayerEligibleToClaimMilestone .

Although the Player's video metric and token eligibility is verified within the KinoraOpenAction Contract, there is still potential for a player to send fabricated off-chain video metric data to the KinoraMetrics contract, and thus, an additional check aids in reducing this.

See here for more on how the SDK manages the risk of data corruption during the off-chain logging and transmission of metrics.

You can verify a player to claim a milestone before they have reached their metric targets, however the player will still not be able to claim their reward and mark the milestone as completed until they've reached the metric targets. To check a player's milestone eligibility against their logged video metrics and the milestone's video thresholds, see playerMilestoneEligibilityCheck.

await newEnvoker.setPlayerEligibleToClaimMilestone({
    1,
    1,
    "0x0106",
    true,
  });

Verify Milestone Props

/* The Quest Id to close. If you need to find the Quest Id from the Lens Publication Id, you can call getQuestIdFromPublication from the Helpers functions or call getQuestIdFromLensData directly to the KinoraQuestData contract. */
questId: string;

/* The milestone number to verify the player for. */
milestone: number;

/* The Lens profile Id of the player being verified. */
playerProfileId: `0x${string}`;

/* Set to true to verify the player to complete the milestone and claim the milestone rewards. */
eligible: boolean;

/* (Optional) Existing Kinora Metrics Contract from a previously  Factory instantiation. */
kinoraMetricsContract?: `0x${string}`;

/* (Optional) Wallet instance for Polygon Network. If you have passed the wallet object to the constructor, it is not necessary here. */
wallet?: ethers.Wallet;

Response Object

/* Transaction hash for Player verification. */
txHash?: string;

/* Boolean to indicate whether an error was encountered during verification. */
error: boolean;

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

Last updated