update_end

Call v273 → current #7

Updates the end block for a crowdloan.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: developerssubnet owners

The Big Picture

Adjust timeline to match conditions.

Use Cases

  • Extend or shorten campaign

From Chain Metadata

Update the end block of a non-finalized crowdloan. The dispatch origin for this call must be _Signed_ and must be the creator of the crowdloan. Parameters: `crowdloan_id`: The id of the crowdloan to update the end block of. `new_end`: The new end block.

Input Parameters

#NameTypeDescription
0
crowdloan_id
Compact<u32> Cptcrowdloan_id (Compact<u32>) (SCALE compact -> integer)
1
new_end
Compact<u32> Cptnew_end (Compact<u32>) (SCALE compact -> integer)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Crowdloan not finalized
  • Signer is creator
  • New end in future

Effects

Events Emitted

Storage Modified

Postconditions

  • End block updated
  • EndUpdated event emitted

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Build update_end call
const crowdloan_id = 0;
const new_end = 0;

const call = api.tx[stringCamelCase("Crowdloan")][stringCamelCase("update_end")](
  crowdloan_id,
  new_end
);

Runtime Info

Pallet Index
27
Call Index
7
First Version
v273
Current Version
v393