PartiallyRefunded

Event v273 → current #3

Emitted when some contributors have been refunded.

View events on chain
Useful for: stakersdevelopersanalytics

The Big Picture

Refund in progress - more calls needed.

Use Cases

  • Track refund progress

From Chain Metadata

A refund was partially processed for a failed crowdloan.

Triggers

Emitted by

Preconditions

  • Crowdloan not finalized
  • Has more contributors than limit

Effects

Storage Modified

Postconditions

  • Some contributors refunded

Event Data

#NameTypeDescription
0
crowdloan_id
u32 CrowdloanIdCrowdloan identifier

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Subscribe to PartiallyRefunded events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.Crowdloan.PartiallyRefunded.get(block.hash);
  for (const evt of events) {
    console.log("PartiallyRefunded:", evt.payload);
  }
});

Runtime Info

Pallet Index
27
Event Index
3
First Version
v273
Current Version
v411