# Complete Milestone

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.&#x20;

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](/sdk-reference/envoker/verify-player-milestone.md).

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

{% code overflow="wrap" fullWidth="true" %}

```typescript
const { txHash, error, errorMessage } = await newDispatch.playerCompleteQuestMilestone("8776305547672229303710652256128036480640562614756544519403188376059", new ethers.Wallet(process.env.PLAYER_PRIVATE_KEY, polygonProvider));
```

{% endcode %}

**Player Join Quest Props:**

{% code overflow="wrap" fullWidth="true" %}

```typescript
/* The postId of the invoked Quest. */
postId: string;

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

{% endcode %}

**Result Object:**

{% code overflow="wrap" fullWidth="true" %}

```typescript
/* 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;
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://codex.irrevocable.dev/sdk-reference/dispatch/complete-milestone.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
