Skip to content

v1.1.10

Latest

Choose a tag to compare

@starknetdev starknetdev released this 20 May 16:52
e24bf41

Note: This tag was force-recreated to point at the post-#115 merge commit. The previous v1.1.10 content (extension-claim dispatch) is preserved in commit history but no longer addressable by tag.

Breaking changes: extension trait simplification

Adapts host-side dispatch wrappers + mocks to the simplified IPrizeExtension / IEntryFeeExtension shape from metagame-extensions v0.1.5:

fn payout_prize_extension(ctx_id, prize_id, token_id: Option<felt252>,
                          payout_params: Span<felt252>);
fn payout_entry_fee_extension(ctx_id, token_id: Option<felt252>,
                              claim_params: Span<felt252>);

The host is now a pure dispatcher. The extension owns recipient resolution, eligibility checks, and asset transfer; the host passes (token_id, payout_params) through unmodified.

Why:

  • Position-based payout_* forced every extension into a leaderboard-winner-as-recipient frame. Non-leaderboard extensions had to shoehorn into positional semantics or stuff identity into payout_params.
  • Host-supplied recipient meant the host had to know what the extension would compute. For non-positional extensions the host has nothing to compute, so the parameter was dead weight.

Conventions:

  • token_id = Some(id) — claim path. Extension typically derives recipient via owner_of(id).
  • token_id = None — non-claim flow (sponsor refund, dao distribution, raffle). Extension extracts whatever it needs from payout_params.

Integration

Pin metagame-extensions to v0.1.5 to consume the matching trait change + preset adaptations (NFTPrize / NFTEntryFee derive position from token_id via ILeaderboard::get_position; DynamicEntryFee pays its sovereign configured recipient).

See #115 for full implementation details. See metagame-extensions v0.1.5 for the trait + preset side.